[patch] libdvbpsi leaks memory with demux attached
Johann Hanne <[email protected]>
| Newsgroups | gmane.comp.video.videolan.libdvbpsi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, when you do a AttachDemux() and feed packets to it with dvbpsi_PushPacket(), allocated memory doesn't get free()d again for each arriving subtable that doesn't have a subdecoder assigned to it. The reason is that dvbpsi_Demux() does not free the p_section if it doesn't find a subdecoder. The attached patch fixes this problem. Cheers, Jonny
memleak-fix.patch
(text/x-diff, 531 B)
Index: src/demux.c
===================================================================
RCS file: /var/cvs/videolan/libdvbpsi/src/demux.c,v
retrieving revision 1.1
diff -u -r1.1 demux.c
--- src/demux.c 11 Dec 2002 13:04:56 -0000 1.1
+++ src/demux.c 22 Sep 2003 17:04:36 -0000
@@ -136,6 +136,10 @@
{
p_subdec->pf_callback(p_demux->p_decoder, p_subdec->p_cb_data, p_section);
}
+ else
+ {
+ dvbpsi_DeletePSISections(p_section);
+ }
}
/*****************************************************************************