capture: dont leak listed files strings

Fix leak introduced by #50
This commit is contained in:
Christian Hergert
2020-09-28 15:56:36 -07:00
parent 28bb526603
commit b39a43d218

View File

@ -123,6 +123,10 @@ sysprof_capture_reader_finalize (SysprofCaptureReader *self)
{ {
if (self != NULL) if (self != NULL)
{ {
for (size_t i = 0; i < self->n_list_files; i++)
free (self->list_files[i]);
free (self->list_files);
close (self->fd); close (self->fd);
free (self->buf); free (self->buf);
free (self->filename); free (self->filename);