avformat/sapenc: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
437da3e349
commit
71e515c180
@ -134,7 +134,7 @@ static int sap_write_header(AVFormatContext *s)
|
|||||||
freeaddrinfo(ai);
|
freeaddrinfo(ai);
|
||||||
}
|
}
|
||||||
|
|
||||||
contexts = av_mallocz(sizeof(AVFormatContext*) * s->nb_streams);
|
contexts = av_mallocz_array(s->nb_streams, sizeof(AVFormatContext*));
|
||||||
if (!contexts) {
|
if (!contexts) {
|
||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user