Fix: stream fd leaks on error
[deliverable/lttng-ust.git] / liblttng-ust / lttng-ust-abi.c
index daf0d5e4caa0185652605e9a0496c2ad0fb2f0b3..1bf7a5aeab03a84b09c05dda0fdfe9ab8b7ead97 100644 (file)
@@ -772,6 +772,9 @@ int lttng_abi_map_stream(int channel_objd, struct lttng_ust_stream *info,
                info->stream_nr, info->len);
        if (ret)
                goto error_add_stream;
+       /* Take ownership of shm_fd and wakeup_fd. */
+       uargs->stream.shm_fd = -1;
+       uargs->stream.wakeup_fd = -1;
 
        return 0;
 
This page took 0.023869 seconds and 5 git commands to generate.