X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=035fe7f676e8797d3a8b1d4642d4fab70de6553f;hp=7da843a9e0a1d1bb56ba896e8283d28fec301358;hb=5548a3813aac21320fd4cd415bb47a293e1dc6e0;hpb=9c2fd06dc38a3bc69911b6a4b0ba37cc00918882 diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 7da843a9e..035fe7f67 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -2320,11 +2320,16 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app) ret = ustctl_create_stream(app->sock, ua_chan->obj, &ustream->obj); if (ret < 0) { - /* Got all streams */ - lttng_fd_put(LTTNG_FD_APPS, 2); + /* Free unused memory and reset FD states. */ free(ustream); + lttng_fd_put(LTTNG_FD_APPS, 2); + if (ret == -ENOENT) { + /* Got all streams. Continue normal execution. */ + break; + } + /* Error at this point. Stop everything. */ ret = LTTNG_ERR_UST_STREAM_FAIL; - break; + goto error_rcu_unlock; } ustream->handle = ustream->obj->handle;