avcodec/exr: use av_freep() for saftey
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 1 Apr 2014 03:18:26 +0000 (05:18 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 1 Apr 2014 03:18:26 +0000 (05:18 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/exr.c

index 8ee266b..084025a 100644 (file)
@@ -652,8 +652,8 @@ static int piz_uncompress(EXRContext *s, const uint8_t *src, int ssize,
     if (!td->lut)
         td->lut = av_malloc(1 << 17);
     if (!td->bitmap || !td->lut) {
-        av_free(td->bitmap);
-        av_free(td->lut);
+        av_freep(&td->bitmap);
+        av_freep(&td->lut);
         return AVERROR(ENOMEM);
     }