From 5e39c55231b47311a49246eef5f1412a06c8a978 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Wed, 15 Dec 2021 18:29:03 +0100 Subject: [PATCH] Unmap stream buffer in ovni_free_streams() --- trace.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/trace.c b/trace.c index 74aef91..0a3a752 100644 --- a/trace.c +++ b/trace.c @@ -538,6 +538,13 @@ ovni_load_streams(struct ovni_trace *trace) void ovni_free_streams(struct ovni_trace *trace) { + for(size_t i = 0; i < trace->nstreams; i++) + { + struct ovni_stream *stream = &trace->stream[i]; + if(munmap(stream->buf, stream->size) != 0) + die("munmap stream failed: %s\n", strerror(errno)); + } + free(trace->stream); }