[vlc-commits] Fix potential NULL pointer deref (cid #1049834)
Rémi Duraffort
git at videolan.org
Sun Jul 14 12:04:09 CEST 2013
vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jul 13 23:20:41 2013 +0200| [450e57dfe4216c09839dfa6fa3ca02edf2543cfd] | committer: Jean-Baptiste Kempf
Fix potential NULL pointer deref (cid #1049834)
(cherry picked from commit eee0caf112ef3e6bcafb5f605955209530d77c5d)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=450e57dfe4216c09839dfa6fa3ca02edf2543cfd
---
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