Memory leak when unrefing GESTimeline
Hello,
I accidentally found out that a GESTimeline doesn't get properly destroyed even when all the references disappear. I have randomly searched for other structs that don't get cleaned up properly, both in GES and in Gst, so far it seems pretty specific to GESTimeline.
I'm using ubuntu 19.10 (eoan), so libgstreamer and libges 1.16.1.
I'm not sure if this can be used to perform DOS since a LOT of timelines have to be created, but I'm putting this as confidential just to be sure.
Here is a little piece of C code that tests the memory leak.
#include <stdio.h>
#include <ges/ges.h>
int test_ges() {
GESTimeline* timeline = ges_timeline_new();
gst_object_unref(timeline);
return 0;
}
int main(int argc, char** argv) {
gst_init(&argc, &argv);
ges_init();
for(int i = 0; i < 150000; ++i) {
if(i%100 == 0) {
printf("%i\n", i);
}
test_ges();
}
printf("Press Any Key to Continue\n");
getchar();
}
Here is the evidence of the memory leak.
26629: bin/gestest
000055cf6c490000 4K r---- gestest
000055cf6c491000 4K r-x-- gestest
000055cf6c492000 4K r---- gestest
000055cf6c493000 4K r---- gestest
000055cf6c494000 4K rw--- gestest
000055cf6c7d1000 159284K rw--- [ anon ]