png: Use av_freep() instead of av_free()
authorDonny Yang <work@kota.moe>
Sat, 28 Mar 2015 15:14:21 +0000 (15:14 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 28 Mar 2015 16:16:55 +0000 (17:16 +0100)
Signed-off-by: Donny Yang <work@kota.moe>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/pngenc.c

index 9bdefc4..0231bf7 100644 (file)
@@ -512,9 +512,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     ret         = 0;
 
 the_end:
-    av_free(crow_base);
-    av_free(progressive_buf);
-    av_free(top_buf);
+    av_freep(&crow_base);
+    av_freep(&progressive_buf);
+    av_freep(&top_buf);
     deflateEnd(&s->zstream);
     return ret;
 fail: