[vlc-devel] commit: p_sys NULL check (CID 115). (Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Aug 7 03:36:29 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Aug  6 17:44:20 2008 -0700| [3891d41236dd9fc62f84aaff22bdfda3d46718d9] | committer: Jean-Baptiste Kempf 

p_sys NULL check (CID 115).

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

 modules/codec/svcdsub.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/codec/svcdsub.c b/modules/codec/svcdsub.c
index b7bf4a9..4762b3c 100644
--- a/modules/codec/svcdsub.c
+++ b/modules/codec/svcdsub.c
@@ -148,6 +148,9 @@ static int DecoderOpen( vlc_object_t *p_this )
     }
 
     p_dec->p_sys = p_sys = calloc( 1, sizeof( decoder_sys_t ) );
+    if( p_sys == NULL )
+        return VLC_ENOMEM;
+
     p_sys->i_debug       = config_GetInt( p_this, MODULE_STRING "-debug" );
 
     p_sys->i_image       = -1;




More information about the vlc-devel mailing list