lavfi/vf_overlay: fix memory leaks
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Fri, 4 Dec 2015 05:20:24 +0000 (00:20 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Wed, 9 Dec 2015 12:57:57 +0000 (07:57 -0500)
commit301c2784b35036945cd9a7049808deecce149916
tree0c553e9724086575ae253229a086a3ad14121407
parent00c322014904c2d5be92cc292b162d31f18a7058
lavfi/vf_overlay: fix memory leaks

Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and
3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1338327.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavfilter/vf_overlay.c