Commit a863c97e authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Martin Storsjö

smoothstreamingenc: Fix a memory leak on errors

Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent 246f8695
......@@ -155,9 +155,10 @@ static void get_private_data(OutputStream *os)
return;
os->private_str = av_mallocz(2*size + 1);
if (!os->private_str)
return;
goto fail;
for (i = 0; i < size; i++)
snprintf(&os->private_str[2*i], 3, "%02x", ptr[i]);
fail:
if (ptr != codec->extradata)
av_free(ptr);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment