X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=7e3bf45036d6f28741a337bd4d9004d3ae192b80;hb=f52e590232f939bd6b5c88a483765c03e37fc733;hp=708b9192f22b62b14985f8d7ffa3c7d423813d2d;hpb=118c051e465a0bffe22bb5bc57943f54c4afdc86;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 708b9192..7e3bf450 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -987,7 +987,7 @@ int handle_message(struct sock_info *sock_info, } case LTTNG_UST_EVENT_NOTIFIER_GROUP_CREATE: { - int event_notifier_notif_fd; + int event_notifier_notif_fd, close_ret; len = ustcomm_recv_event_notifier_notif_fd_from_sessiond(sock, &event_notifier_notif_fd); @@ -1024,6 +1024,13 @@ int handle_message(struct sock_info *sock_info, &args, sock_info); else ret = -ENOSYS; + if (args.event_notifier_handle.event_notifier_notif_fd >= 0) { + lttng_ust_lock_fd_tracker(); + close_ret = close(args.event_notifier_handle.event_notifier_notif_fd); + lttng_ust_unlock_fd_tracker(); + if (close_ret) + PERROR("close"); + } break; } case LTTNG_UST_CHANNEL: