diff --git a/libavformat/mov.c b/libavformat/mov.c index 38d36590e6..7ab2808c85 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -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 {