diff options
author | wm4 <wm4@nowhere> | 2013-05-18 12:23:02 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-18 17:45:55 +0200 |
commit | b0a60b7321c8878154f2488d99dd7b99cefca43b (patch) | |
tree | 8c2e881ab62d43b263fe58ca4dc0ef3cf42d3496 /video/filter/vf.c | |
parent | f569d245ba37898a79e853cb6fbd906dd992b531 (diff) | |
download | mpv-b0a60b7321c8878154f2488d99dd7b99cefca43b.tar.bz2 mpv-b0a60b7321c8878154f2488d99dd7b99cefca43b.tar.xz |
video/filter: fix option parser memory leak
This happens only if an option actually allocates memory (like strings).
Change filter API such that vf->priv is free'd by vf.c instead by the
filters. vf.c will free the option values as well.
Diffstat (limited to 'video/filter/vf.c')
-rw-r--r-- | video/filter/vf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c index 257d65e58b..215bf0dc0e 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -501,6 +501,9 @@ void vf_uninit_filter(vf_instance_t *vf) if (vf->uninit) vf->uninit(vf); vf_forget_frames(vf); + const m_struct_t *st = vf->info->opts; + if (st) + m_struct_free(st, vf->priv); talloc_free(vf); } |