diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-19 15:04:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-19 15:04:56 +0100 |
commit | b44ae59b70913244e5c33d54a2662fd9b2aed7fa (patch) | |
tree | 5f64142cd1f3573e5da68795771473c9052332a0 /libavfilter | |
parent | 4d48ea3c4bcbdbd448aa50e286765e3548cf9c48 (diff) | |
download | ffmpeg-b44ae59b70913244e5c33d54a2662fd9b2aed7fa.tar.gz |
avfilter/vsrc_life: Use av_freep() avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vsrc_life.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c index 029e1bb9ac..9410fbeb0f 100644 --- a/libavfilter/vsrc_life.c +++ b/libavfilter/vsrc_life.c @@ -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) |