You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/smoothstreamingenc: fix memleak
Fixes CID1224285 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user