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
This commit is contained in:
Daniel Kristjansson 2010-01-28 09:11:26 +00:00 committed by Benoit Fouet
parent 12f1b1fec4
commit 31277aebd9

View File

@ -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;