Unmap stream buffer in ovni_free_streams()

This commit is contained in:
Rodrigo Arias 2021-12-15 18:29:03 +01:00
parent bb14becb75
commit 5e39c55231

View File

@ -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);
}