X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=979ae7c3c7659c97997649b5d477c68ecf47e7da;hb=c7a339aad4c9313da1ccb9c77aeacc5790c41bda;hp=3abdefd7d5601c898c3305f1552bd96fbb6b014d;hpb=d65d2de846d9a0360d1ac55408f06a2b55151695;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 3abdefd7d..979ae7c3c 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -3903,6 +3903,9 @@ void ust_app_global_update(struct ltt_ust_session *usess, int sock) sizeof(ua_chan->name))) { ret = create_ust_app_metadata(ua_sess, app, usess->consumer, &ua_chan->attr); + if (ret < 0) { + goto error_unlock; + } /* Remove it from the hash table and continue!. */ ret = lttng_ht_del(ua_sess->channels, &iter); assert(!ret); @@ -3910,14 +3913,14 @@ void ust_app_global_update(struct ltt_ust_session *usess, int sock) continue; } else { ret = do_create_channel(app, usess, ua_sess, ua_chan); - } - if (ret < 0) { - /* - * Stop everything. On error, the application failed, no more - * file descriptor are available or ENOMEM so stopping here is - * the only thing we can do for now. - */ - goto error_unlock; + if (ret < 0) { + /* + * Stop everything. On error, the application failed, no more + * file descriptor are available or ENOMEM so stopping here is + * the only thing we can do for now. + */ + goto error_unlock; + } } cds_lfht_for_each_entry(ua_chan->ctx->ht, &iter_ctx.iter, ua_ctx,