After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734344 - aiffparse: pointers not unreferred
aiffparse: pointers not unreferred
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-06 10:00 UTC by Anuj
Modified: 2014-09-29 05:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
two pointers not freed in the GST_EVENT_TAG case (755 bytes, patch)
2014-08-06 10:00 UTC, Anuj
rejected Details | Review

Description Anuj 2014-08-06 10:00:20 UTC
Created attachment 282646 [details] [review]
two pointers not freed in the GST_EVENT_TAG case

In gst-plugins-bad/tests/check/elements:
aiffparse.c file to pointers were not unreferred;

 g_free (tags);
 gst_tag_list_free (aiff_tags);
Comment 1 Sebastian Dröge (slomo) 2014-08-06 10:04:27 UTC
Review of attachment 282646 [details] [review]:

How can these memory leaks be made visible? Running the unit test in valgrind with "make elements/aiffparse.valgrind" does not show any leaks.

::: tests/check/elements/aiffparse.c
@@ +123,2 @@
       have_tags = TRUE;
+      g_free (tags);

This is a static array that does not need to be freed

@@ +123,3 @@
       have_tags = TRUE;
+      g_free (tags);
+      gst_tag_list_free (aiff_tags);

the tags returned by gst_event_parse_tags() is not owned by the caller (see the transfer none annotation). It's only valid as long as the event is valid, and the caller is not supposed to free them