X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=e9fa3b462d29d533583815296d3ed20c6723ce8e;hb=a655f4cf59f557aef3f0a975988d87bdd3b199fd;hp=84594ad24927bf9ab4771d534f4dc8f88360491e;hpb=850767541647c102a299d7fbc39c97555ac70224;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 84594ad24..e9fa3b462 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2590,10 +2590,12 @@ static int record_kernel_snapshot(struct ltt_kernel_session *ksess, ret = kernel_snapshot_record(ksess, output, wait, nb_streams); if (ret < 0) { - ret = LTTNG_ERR_SNAPSHOT_FAIL; if (ret == -EINVAL) { ret = LTTNG_ERR_INVALID; + goto error_snapshot; } + + ret = LTTNG_ERR_SNAPSHOT_FAIL; goto error_snapshot; } @@ -2646,10 +2648,12 @@ static int record_ust_snapshot(struct ltt_ust_session *usess, ret = ust_app_snapshot_record(usess, output, wait, nb_streams); if (ret < 0) { - ret = LTTNG_ERR_SNAPSHOT_FAIL; if (ret == -EINVAL) { ret = LTTNG_ERR_INVALID; + goto error_snapshot; } + + ret = LTTNG_ERR_SNAPSHOT_FAIL; goto error_snapshot; }