GNOME Bugzilla – Bug 541087
[mpegtsparse] memory leaks on tables parsing
Last modified: 2008-07-02 07:55:47 UTC
Numerous leaks exists in mpegtspacketizer table parsing. Here is some outputs from valgrind: ==15575== 22,646 (1,592 direct, 21,054 indirect) bytes in 94 blocks are definitely lost in loss record 18 of 24 ==15575== at 0x4022765: malloc (vg_replace_malloc.c:149) ==15575== by 0x415CAF5: g_malloc (in /usr/lib/libglib-2.0.so.0.1400.1) ==15575== by 0x417150A: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.1400.1) ==15575== by 0x4137578: g_array_sized_new (in /usr/lib/libglib-2.0.so.0.1400.1) ==15575== by 0x4137686: g_array_new (in /usr/lib/libglib-2.0.so.0.1400.1) ==15575== by 0x40971ED: gst_value_init_list_or_array (gstvalue.c:171) ==15575== by 0x4109644: g_value_init (in /usr/lib/libgobject-2.0.so.0.1400.1) ==15575== by 0x47427FF: mpegts_packetizer_parse_eit (mpegtspacketizer.c:1475) ==15575== by 0x473DC54: mpegts_parse_handle_psi (mpegtsparse.c:1153) ==15575== by 0x473DE29: mpegts_parse_chain (mpegtsparse.c:1219) ==15575== by 0x4072698: gst_pad_chain_unchecked (gstpad.c:3503) ==15575== by 0x4072D51: gst_pad_push (gstpad.c:3671) ==15575== ==18704== 12,207 (760 direct, 11,447 indirect) bytes in 38 blocks are definitely lost in loss record 21 of 25 ==18704== at 0x4021AA4: calloc (vg_replace_malloc.c:279) ==18704== by 0x415CA5D: g_malloc0 (in /usr/lib/libglib-2.0.so.0.1400.1) ==18704== by 0x408613A: gst_structure_id_empty_new_with_size (gststructure.c:116) ==18704== by 0x4086735: gst_structure_new_valist (gststructure.c:238) ==18704== by 0x40867B1: gst_structure_new (gststructure.c:209) ==18704== by 0x47402F0: mpegts_packetizer_parse_nit (mpegtspacketizer.c:785) ==18704== by 0x473DBB6: mpegts_parse_handle_psi (mpegtsparse.c:1092) ==18704== by 0x473DE29: mpegts_parse_chain (mpegtsparse.c:1219) ==18704== by 0x4072698: gst_pad_chain_unchecked (gstpad.c:3503) ==18704== by 0x4072D51: gst_pad_push (gstpad.c:3671) ==18704== by 0x4725550: gst_base_src_loop (gstbasesrc.c:2051) ==18704== by 0x408C895: gst_task_func (gsttask.c:192)
Created attachment 113784 [details] [review] proposed fix for the bug I only have added some free(s) on the valgrind highlights.
*** This bug has been marked as a duplicate of 539292 ***
Well, okay, it is the same bug but not the same leaks. The two patches are required in order to have a mpegtsparse without leaks...