mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-capture: fix leak of mapped ring buffer structure
This commit is contained in:
@ -335,6 +335,8 @@ mapped_ring_buffer_finalize (MappedRingBuffer *self)
|
||||
close (self->fd);
|
||||
self->fd = -1;
|
||||
}
|
||||
|
||||
free (self);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@ -163,6 +163,9 @@ test_threaded_movements (void)
|
||||
|
||||
g_thread_join (thread1);
|
||||
g_thread_join (thread2);
|
||||
|
||||
mapped_ring_buffer_unref (writer);
|
||||
mapped_ring_buffer_unref (reader);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -183,6 +186,8 @@ test_readwrite (void)
|
||||
mapped_ring_buffer_advance (ring, sizeof *ptr);
|
||||
}
|
||||
mapped_ring_buffer_drain (ring, drain_count_cb, NULL);
|
||||
|
||||
mapped_ring_buffer_unref (ring);
|
||||
}
|
||||
|
||||
gint
|
||||
|
||||
Reference in New Issue
Block a user