Fix: stream fd leaks on error
[lttng-ust.git] / liblttng-ust / lttng-ust-abi.c
index b5c305a951cc23e6a290401ce2b5c03b894e1d3c..77bb90db02d24d42ccdf6c996a3d1c82e9266e70 100644 (file)
@@ -1107,6 +1107,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.022724 seconds and 4 git commands to generate.