[vlc-commits] mkv: add missing vlc_input_attachment_New() error handling
Thomas Guillem
git at videolan.org
Tue Aug 18 10:55:27 CEST 2015
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Aug 18 10:51:19 2015 +0200| [0a0c6e7cf8608930edc06c1dcd04064f638e2c6c] | committer: Thomas Guillem
mkv: add missing vlc_input_attachment_New() error handling
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0a0c6e7cf8608930edc06c1dcd04064f638e2c6c
---
modules/demux/mkv/mkv.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index bd7abc5..cdf2dbf 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -312,6 +312,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
attachment_c *a = p_sys->stored_attachments[i];
(*ppp_attach)[i] = vlc_input_attachment_New( a->fileName(), a->mimeType(), NULL,
a->p_data, a->size() );
+ if( !(*ppp_attach)[i] )
+ {
+ free(*ppp_attach);
+ return VLC_ENOMEM;
+ }
}
return VLC_SUCCESS;
More information about the vlc-commits
mailing list