X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust-ctl%2Fustctl.c;h=a7eca3b0b611d7d47513ab4c968b4a75666071a2;hb=3208818bfe394315cae502a14e01195713299aac;hp=ea5ab9dc4ed3ce29cd3dad50b1cc16c4bc32167a;hpb=6a359b8a40062865e081cd959ecbef934c761861;p=lttng-ust.git diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index ea5ab9dc..a7eca3b0 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -17,7 +17,6 @@ */ #define _GNU_SOURCE -#include #include #include #include @@ -27,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -111,8 +111,10 @@ int ustctl_release_object(int sock, struct lttng_ust_object_data *data) ret = -errno; return ret; } + data->u.channel.wakeup_fd = -1; } free(data->u.channel.data); + data->u.channel.data = NULL; break; case LTTNG_UST_OBJECT_TYPE_STREAM: if (data->u.stream.shm_fd >= 0) { @@ -121,6 +123,7 @@ int ustctl_release_object(int sock, struct lttng_ust_object_data *data) ret = -errno; return ret; } + data->u.stream.shm_fd = -1; } if (data->u.stream.wakeup_fd >= 0) { ret = close(data->u.stream.wakeup_fd); @@ -128,6 +131,7 @@ int ustctl_release_object(int sock, struct lttng_ust_object_data *data) ret = -errno; return ret; } + data->u.stream.wakeup_fd = -1; } break; case LTTNG_UST_OBJECT_TYPE_EVENT: