[vlc-commits] Fix potential NULL pointer deref (cid #1049834)

Rémi Duraffort git at videolan.org
Sat Jul 13 23:37:34 CEST 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jul 13 23:20:41 2013 +0200| [eee0caf112ef3e6bcafb5f605955209530d77c5d] | committer: Rémi Duraffort

Fix potential NULL pointer deref (cid #1049834)

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

 modules/mux/mpeg/ts.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index 4703a92..2cfd8cf 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -1102,8 +1102,11 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
     return VLC_SUCCESS;
 
 oom:
-    free(p_stream->lang);
-    free(p_stream);
+    if(p_stream)
+    {
+        free(p_stream->lang);
+        free(p_stream);
+    }
     return VLC_ENOMEM;
 }
 



More information about the vlc-commits mailing list