[vlc-commits] asf: missing initializer
Rémi Denis-Courmont
git at videolan.org
Sat Nov 11 18:02:11 CET 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 11 19:02:03 2017 +0200| [d32636009950b0dca21efcbf5dcb304b279734d4] | committer: Rémi Denis-Courmont
asf: missing initializer
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d32636009950b0dca21efcbf5dcb304b279734d4
---
modules/demux/asf/libasf.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/modules/demux/asf/libasf.c b/modules/demux/asf/libasf.c
index 35d69c62fa..119ef4d0e3 100644
--- a/modules/demux/asf/libasf.c
+++ b/modules/demux/asf/libasf.c
@@ -707,14 +707,13 @@ static int ASF_ReadObject_codec_list( stream_t *s, asf_object_t *p_obj )
if( ASF_HAVE( p_codec->i_information_length ) )
{
p_codec->p_information = malloc( p_codec->i_information_length );
- if( unlikely(p_codec->p_information == NULL
- && p_codec->i_information_length > 0) )
- goto error;
-
- memcpy( p_codec->p_information, p_data,
- p_codec->i_information_length );
+ if( likely(p_codec->p_information != NULL) )
+ memcpy( p_codec->p_information, p_data,
+ p_codec->i_information_length );
p_data += p_codec->i_information_length;
}
+ else
+ p_codec->p_information = NULL;
#ifdef ASF_DEBUG
msg_Dbg( s, " - codec[%"PRIu32"] %s name:\"%s\" "
More information about the vlc-commits
mailing list