Skip to content

Commit

Permalink
banding/cambifilter.c: fix use after free
Browse files Browse the repository at this point in the history
Signed-off-by: akarin <i@akarin.info>
  • Loading branch information
AkarinVS committed Nov 15, 2021
1 parent 305dbca commit b5e9bcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion banding/cambifilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ static const VSFrameRef *VS_CC cambiGetFrame(int n, int activationReason, void *
}
err = cambi_extract(&s, &pic, &score, d->scores ? c_values : NULL);
cambi_close(&s);
vsapi->freeFrame(src);

VSMap *prop = vsapi->getFramePropsRW(dst);
if (d->scores) {
Expand All @@ -85,6 +84,7 @@ static const VSFrameRef *VS_CC cambiGetFrame(int n, int activationReason, void *
vsapi->freeFrame(f);
}
}
vsapi->freeFrame(src);
assert(err == 0);

err = vsapi->propSetFloat(prop, "CAMBI", score, paReplace);
Expand Down

0 comments on commit b5e9bcc

Please sign in to comment.