On 12/05/2015 17:15, Diego Biurrun wrote:
On Tue, May 12, 2015 at 05:55:38PM +0200, Luca Barbato wrote:
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -932,6 +934,11 @@ static int init_pass2(MpegEncContext *s)
qscale = av_malloc(sizeof(double) * rcc->num_entries);
      blurred_qscale = av_malloc(sizeof(double) * rcc->num_entries);
+    if (!qscale || !blurred_qscale) {
+        av_freep(&qscale);
+        av_freep(&blurred_qscale);
+        return AVERROR(ENOMEM);
+    }
av_freep is unnecessary here, these are function-local variables.  You
had plain av_free() here in v5 at least.

Edited locally, thanks.
Vittorio
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to