diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-06 05:02:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-06 05:02:38 +0200 |
commit | a53c5d454ee608fd539e5c02ade3f246470d1cb2 (patch) | |
tree | 578d1aae600341b0cd0197e67c622d7bab619428 | |
parent | 37715b4594dd89f0b8571b3193fa9cb944a5f968 (diff) | |
download | ffmpeg-a53c5d454ee608fd539e5c02ade3f246470d1cb2.tar.gz |
avformat/smoothstreamingenc: fix memleak
Fixes CID1224285
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-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 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); } |