[Bug 722462] [PATCH] tsdemux: Fix leak of PCROffsetGroup

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Jan 17 17:21:47 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=722462
  GStreamer | gst-plugins-bad | git

Thiago Sousa Santos <thiago.sousa.santos> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #266588|none                        |needs-work
             status|                            |

--- Comment #1 from Thiago Sousa Santos <thiago.sousa.santos at collabora.co.uk> 2014-01-18 01:21:39 UTC ---
Review of attachment 266588:
 --> (https://bugzilla.gnome.org/review?bug=722462&attachment=266588)

I can confirm that this patch fixes the leak, just have one minor nitpick about
it.

::: gst/mpegtsdemux/mpegtspacketizer.c
@@ -102,1 +103,4 @@
   for (i = 0; i < packetizer->lastobsid; i++) {
+    for (tmp = packetizer->observations[i]->groups; tmp; tmp = tmp->next) {
+      g_free (((PCROffsetGroup *) tmp->data)->values);
+      g_slice_free (PCROffsetGroup, tmp->data);

How about creating a pcr_offset_group_free function and call it from here with
maybe using g_list_free_full instead?

Should make it easier to understand and reuse in case needed.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list