lavfi/af_channelmap: fix memory leak
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Fri, 4 Dec 2015 05:49:55 +0000 (00:49 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Wed, 9 Dec 2015 12:58:13 +0000 (07:58 -0500)
commit924fcac52148ef3e37ea39b5901299930b9c1b28
tree4bd07a43dad41927f58cb143d9eea96abbcbbabb
parent31f0d555e07797df1a0a141fa5e022648d480a49
lavfi/af_channelmap: fix memory leak

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 1338330.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavfilter/af_channelmap.c