X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-events.c;h=3f8cb4804ddd0800061f634afb3d6e92022e8103;hp=6e507642a224be3affae1540bd762bc2a138849a;hb=0ab399e0bcf4e99492845f02e3e5b405155dea92;hpb=dd877ea65a8db6b9abcffec9162695059ced90f7 diff --git a/src/bin/lttng-sessiond/notification-thread-events.c b/src/bin/lttng-sessiond/notification-thread-events.c index 6e507642a..3f8cb4804 100644 --- a/src/bin/lttng-sessiond/notification-thread-events.c +++ b/src/bin/lttng-sessiond/notification-thread-events.c @@ -2475,7 +2475,12 @@ int handle_notification_thread_command( } end: cds_list_del(&cmd->cmd_list_node); - lttng_waiter_wake_up(&cmd->reply_waiter); + if (cmd->is_async) { + free(cmd); + cmd = NULL; + } else { + lttng_waiter_wake_up(&cmd->reply_waiter); + } pthread_mutex_unlock(&handle->cmd_queue.lock); return ret; error_unlock: