Module: libav Branch: master Commit: a863c97e99bf30a88baa74f83bab9e3ab25984dc
Author: Michael Niedermayer <[email protected]> Committer: Martin Storsjö <[email protected]> Date: Sun Jul 6 05:02:38 2014 +0200 smoothstreamingenc: Fix a memory leak on errors Signed-off-by: Martin Storsjö <[email protected]> --- libavformat/smoothstreamingenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index 9fe4fe5..457472d 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); } _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
