Skip to content

Commit 4f5e366

Browse files
rcombskylophone
authored andcommitted
integer_motion: fix dict leak in motion_force_zero case
1 parent 7c4beca commit 4f5e366

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

libvmaf/src/feature/integer_motion.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,13 @@ static int extract_force_zero(VmafFeatureExtractor *fex,
269269
return err;
270270
}
271271

272+
static int close_force_zero(VmafFeatureExtractor *fex)
273+
{
274+
MotionState *s = fex->priv;
275+
276+
return vmaf_dictionary_free(&s->feature_name_dict);
277+
}
278+
272279
static int init(VmafFeatureExtractor *fex, enum VmafPixelFormat pix_fmt,
273280
unsigned bpc, unsigned w, unsigned h)
274281
{
@@ -285,7 +292,7 @@ static int init(VmafFeatureExtractor *fex, enum VmafPixelFormat pix_fmt,
285292
if (s->motion_force_zero) {
286293
fex->extract = extract_force_zero;
287294
fex->flush = NULL;
288-
fex->close = NULL;
295+
fex->close = close_force_zero;
289296
return 0;
290297
}
291298

0 commit comments

Comments
 (0)