]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vsrc_life.c
Merge commit 'b0593a4bca138f1f026d8c21e8c3daa96800afe2'
[ffmpeg] / libavfilter / vsrc_life.c
index 029e1bb9acaadb181fd60aa13a3a65ed0f5c0217..9410fbeb0f50a4e13c0633bf3004db25d5214972 100644 (file)
@@ -196,8 +196,8 @@ static int init_pattern_from_file(AVFilterContext *ctx)
 
     if (!(life->buf[0] = av_calloc(life->h * life->w, sizeof(*life->buf[0]))) ||
         !(life->buf[1] = av_calloc(life->h * life->w, sizeof(*life->buf[1])))) {
-        av_free(life->buf[0]);
-        av_free(life->buf[1]);
+        av_freep(&life->buf[0]);
+        av_freep(&life->buf[1]);
         return AVERROR(ENOMEM);
     }
 
@@ -238,8 +238,8 @@ static av_cold int init(AVFilterContext *ctx)
 
         if (!(life->buf[0] = av_calloc(life->h * life->w, sizeof(*life->buf[0]))) ||
             !(life->buf[1] = av_calloc(life->h * life->w, sizeof(*life->buf[1])))) {
-            av_free(life->buf[0]);
-            av_free(life->buf[1]);
+            av_freep(&life->buf[0]);
+            av_freep(&life->buf[1]);
             return AVERROR(ENOMEM);
         }
         if (life->random_seed == -1)