git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deef7f8
)
Check for NULL pointer before using it, not after.
author
Antoine Cellerier
<dionoea@videolan.org>
Sun, 22 Jun 2008 12:37:52 +0000
(14:37 +0200)
committer
Antoine Cellerier
<dionoea@videolan.org>
Sun, 22 Jun 2008 14:58:22 +0000
(16:58 +0200)
modules/video_filter/chain.c
patch
|
blob
|
history
diff --git
a/modules/video_filter/chain.c
b/modules/video_filter/chain.c
index
efbb066
..
dd65f08
100644
(file)
--- a/
modules/video_filter/chain.c
+++ b/
modules/video_filter/chain.c
@@
-221,13
+221,13
@@
static picture_t *Chain( filter_t *p_filter, picture_t *p_pic )
if( !p_sys->p_tmp )
{
picture_t *p_tmp = malloc( sizeof( picture_t ) );
+ if( !p_tmp )
+ return NULL;
vout_AllocatePicture( VLC_OBJECT( p_vout ), p_tmp,
p_sys->fmt_mid.i_chroma,
p_sys->fmt_mid.i_width,
p_sys->fmt_mid.i_height,
p_sys->fmt_mid.i_aspect );
- if( !p_tmp )
- return NULL;
p_sys->p_tmp = p_tmp;
p_tmp->pf_release = NULL;
p_tmp->i_status = RESERVED_PICTURE;