Use av_mallocz in url_open_protocol for URLContext.

Patch by Daniel Kristjansson: danielk cuymedia net

Originally committed as revision 21501 to svn://svn.ffmpeg.org/ffmpeg/trunk
release/0.6
Daniel Kristjansson 15 years ago committed by Benoit Fouet
parent 12f1b1fec4
commit 31277aebd9
  1. 2
      libavformat/avio.c

@ -76,7 +76,7 @@ int url_open_protocol (URLContext **puc, struct URLProtocol *up,
URLContext *uc; URLContext *uc;
int err; int err;
uc = av_malloc(sizeof(URLContext) + strlen(filename) + 1); uc = av_mallocz(sizeof(URLContext) + strlen(filename) + 1);
if (!uc) { if (!uc) {
err = AVERROR(ENOMEM); err = AVERROR(ENOMEM);
goto fail; goto fail;

Loading…
Cancel
Save