avformat/mov: fix memory leak
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Mon, 16 Nov 2015 01:12:20 +0000 (20:12 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Mon, 16 Nov 2015 12:41:33 +0000 (07:41 -0500)
Fixes: CID 1338328.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavformat/mov.c

index 38d3659..7ab2808 100644 (file)
@@ -430,6 +430,7 @@ retry:
             if (snprintf(str, str_size_alloc, "%f", val) >= str_size_alloc) {
                 av_log(c->fc, AV_LOG_ERROR,
                        "Failed to store the float32 number (%f) in string.\n", val);
+                av_free(str);
                 return AVERROR_INVALIDDATA;
             }
         } else {