Fix: memstream compat layer requires use of babeltrace_close_memstream
[babeltrace.git] / formats / lttng-live / lttng-live-comm.c
index e339add6e6981a767e403661440c151ec48ba02a..8509377c271014e2b7d0a27328e419ce66f08698 100644 (file)
@@ -932,8 +932,10 @@ int get_new_metadata(struct lttng_live_ctx *ctx,
                }
        } while (ret > 0 || !len_read);
 
-       if (fclose(metadata_stream->metadata_fp_write))
-               perror("fclose");
+       if (babeltrace_close_memstream(metadata_buf, &size,
+                       metadata_stream->metadata_fp_write)) {
+               perror("babeltrace_close_memstream");
+       }
        metadata_stream->metadata_fp_write = NULL;
 
 error:
This page took 0.02242 seconds and 4 git commands to generate.