summaryrefslogtreecommitdiff
path: root/libswscale/yuv2rgb.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-16 22:47:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-16 22:47:21 +0200
commit46a723ec7254e6c99958db84be1e490582981032 (patch)
treef3c73d687db1d5536199e1ea0b659c78df24b314 /libswscale/yuv2rgb.c
parent9078b40d354b1e3e8995ca781d4ccfda0044a8f4 (diff)
swscale/yuv2rgb: make sure yuvTable is set to NULL after deallocation
ensures no stale pointers remain Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/yuv2rgb.c')
-rw-r--r--libswscale/yuv2rgb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index 3a80eca2e1..c0263cdfb5 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -773,7 +773,7 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4],
cgu = ((cgu << 16) + 0x8000) / cy;
cgv = ((cgv << 16) + 0x8000) / cy;
- av_free(c->yuvTable);
+ av_freep(&c->yuvTable);
switch (bpp) {
case 1:
@@ -912,7 +912,6 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4],
fill_gv_table(c->table_gV, 4, cgv);
break;
default:
- c->yuvTable = NULL;
if(!isPlanar(c->dstFormat) || bpp <= 24)
av_log(c, AV_LOG_ERROR, "%ibpp not supported by yuv2rgb\n", bpp);
return -1;