libdvbv5/dvb-scan: fix memory leak
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 17 Nov 2013 12:51:03 +0000 (10:51 -0200)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 27 Nov 2013 11:24:40 +0000 (09:24 -0200)
commitcbd92385a2b5465f2b8f47eae156792543c9144a
treee8b3262dc068901f8976d755084452e763cb2884
parent28a54981d557597c63b625d862066bce455e285d
libdvbv5/dvb-scan: fix memory leak

As pointed by Valgrind, there are still some memory leaks at
dvb_get_ts_tables().

That happens because pmt is allocated by dvb_read_section().
Fix it.

While here, fix the error condition to not mangle with the main
dvb_scan_handler->program pointer.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
lib/libdvbv5/dvb-scan.c