summaryrefslogtreecommitdiffstats
path: root/libhb/denoise.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhb/denoise.c')
-rw-r--r--libhb/denoise.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libhb/denoise.c b/libhb/denoise.c
index 5022d4721..70902a6ec 100644
--- a/libhb/denoise.c
+++ b/libhb/denoise.c
@@ -304,6 +304,11 @@ hb_filter_private_t * hb_denoise_init( int pix_fmt,
}
hb_filter_private_t * pv = malloc( sizeof(struct hb_filter_private_s) );
+
+ /*
+ * Clear the memory to avoid freeing uninitialised memory later.
+ */
+ memset( pv, 0, sizeof( struct hb_filter_private_s ) );
pv->pix_fmt = pix_fmt;
pv->width[0] = width;