Fix memory leaks
This commit is contained in:
parent
8c58a7a6ab
commit
3e35f3d88b
4
emu.c
4
emu.c
@ -1108,6 +1108,10 @@ emu_destroy(struct ovni_emu *emu)
|
||||
close_pcfs(emu);
|
||||
destroy_metadata(emu);
|
||||
ovni_free_streams(&emu->trace);
|
||||
ovni_free_trace(&emu->trace);
|
||||
|
||||
free(emu->global_cpu);
|
||||
free(emu->global_thread);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -90,5 +90,7 @@ int main(void)
|
||||
ovni_flush();
|
||||
ovni_proc_fini();
|
||||
|
||||
free(payload_buf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
6
trace.c
6
trace.c
@ -445,6 +445,12 @@ ovni_free_streams(struct ovni_trace *trace)
|
||||
free(trace->stream);
|
||||
}
|
||||
|
||||
void
|
||||
ovni_free_trace(struct ovni_trace *trace)
|
||||
{
|
||||
free(trace->loom);
|
||||
}
|
||||
|
||||
int
|
||||
ovni_load_next_event(struct ovni_stream *stream)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user