avformat/sapenc: Use av_mallocz_array()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 21 Jul 2014 01:19:12 +0000 (03:19 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 21 Jul 2014 01:19:12 +0000 (03:19 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/sapenc.c

index 82a6ef6..c725ce3 100644 (file)
@@ -134,7 +134,7 @@ static int sap_write_header(AVFormatContext *s)
         freeaddrinfo(ai);
     }
 
-    contexts = av_mallocz(sizeof(AVFormatContext*) * s->nb_streams);
+    contexts = av_mallocz_array(s->nb_streams, sizeof(AVFormatContext*));
     if (!contexts) {
         ret = AVERROR(ENOMEM);
         goto fail;