aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-06 05:02:38 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-06 05:02:38 +0200
commita53c5d454ee608fd539e5c02ade3f246470d1cb2 (patch)
tree578d1aae600341b0cd0197e67c622d7bab619428
parent37715b4594dd89f0b8571b3193fa9cb944a5f968 (diff)
downloadffmpeg-a53c5d454ee608fd539e5c02ade3f246470d1cb2.tar.gz
avformat/smoothstreamingenc: fix memleak
Fixes CID1224285 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/smoothstreamingenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
index d47e44fe6d..5a77ec3f74 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);
}