GNOME Bugzilla – Bug 704921
matroskademux: memory leak in check_subtitle_buffer
Last modified: 2013-07-26 15:11:51 UTC
Created attachment 250187 [details] [review] Patch gst_matroska_demux_check_subtitle_buffer sometimes doesn't unmap the memory. Given that the buffer is a region in a 64kilobyte buffer this can lead to leaking quite a lot of memory.
Review of attachment 250187 [details] [review]: ::: gst/matroska/matroska-demux.c @@ +3021,2 @@ *buf = newbuf; + gst_buffer_map (*buf, &map, GST_MAP_READ); Instead of useless mapping, maybe remember in a "needs_unmap" boolean if you need to unmap. Also the unmapping should IMHO happen before all the copy_into() calls above
Created attachment 250203 [details] [review] Updated patch
commit 7335b81c4770595b3dcd02dd247c7d3b658229a0 Author: Matej Knopp <matej.knopp@gmail.com> Date: Fri Jul 26 16:02:01 2013 +0200 matroskademux: fix memory leak in check_subtitle_buffer https://bugzilla.gnome.org/show_bug.cgi?id=704921