diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-06 05:02:38 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2014-07-07 22:08:42 +0300 |
commit | a863c97e99bf30a88baa74f83bab9e3ab25984dc (patch) | |
tree | f675274b06b85852caa0fb9c6ce91af686d99412 /libavformat | |
parent | 246f869590b8c7313d26e1c2ef56db01f6fd2503 (diff) | |
download | ffmpeg-a863c97e99bf30a88baa74f83bab9e3ab25984dc.tar.gz |
smoothstreamingenc: Fix a memory leak on errors
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/smoothstreamingenc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index 9fe4fe5ae2..457472dc83 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -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); } |