[vlc-commits] smf: fix leak on invalid input

Rémi Denis-Courmont git at videolan.org
Sat Oct 29 11:33:07 CEST 2016


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Oct 28 16:39:28 2016 +0300| [94065b51e99874ea536ff10769366288353c27ec] | committer: Rémi Denis-Courmont

smf: fix leak on invalid input

(cherry picked from commit e1f4fa7bc0b1232444a3d324b004b0d6ea4c8b7b)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=94065b51e99874ea536ff10769366288353c27ec
---

 modules/demux/smf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/demux/smf.c b/modules/demux/smf.c
index 02fdfdd..952cf04 100644
--- a/modules/demux/smf.c
+++ b/modules/demux/smf.c
@@ -336,6 +336,7 @@ int HandleMessage (demux_t *p_demux, mtrk_t *tr, es_out_t *out)
         if (datalen == 0)
         {
             msg_Err (p_demux, "malformatted MIDI event");
+            block_Release(block);
             return -1; /* implicit running status requires non-empty payload */
         }
 



More information about the vlc-commits mailing list