diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-12 13:30:51 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-12 13:31:38 +0400 |
commit | 8c0687abdf64fb2ef3ab2995ad88a3e9df4a2d90 (patch) | |
tree | 70cc57fdc245c32c4983be85599dc2844e740bec /libavfilter/vf_removelogo.c | |
parent | e4d45673ca029d997b1e63e2618d93f46c8d4e5e (diff) |
avfilter/vf_removelogo: use av_freep() for saftey
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_removelogo.c')
-rw-r--r-- | libavfilter/vf_removelogo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_removelogo.c b/libavfilter/vf_removelogo.c index 2044739797..ea04ce04c9 100644 --- a/libavfilter/vf_removelogo.c +++ b/libavfilter/vf_removelogo.c @@ -235,8 +235,8 @@ static int load_mask(uint8_t **mask, int *w, int *h, av_image_copy_plane(*mask, *w, gray_data[0], gray_linesize[0], *w, *h); end: - av_free(src_data[0]); - av_free(gray_data[0]); + av_freep(&src_data[0]); + av_freep(&gray_data[0]); return ret; } @@ -540,9 +540,9 @@ static av_cold void uninit(AVFilterContext *ctx) for (a = 0; a <= s->max_mask_size; a++) { /* Loop through each scanline in a mask. */ for (b = -a; b <= a; b++) { - av_free(s->mask[a][b + a]); /* Free a scanline. */ + av_freep(&s->mask[a][b + a]); /* Free a scanline. */ } - av_free(s->mask[a]); + av_freep(&s->mask[a]); } /* Free the array of pointers pointing to the masks. */ av_freep(&s->mask); |