libdvbv5: avoid playing with memory
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 16 Nov 2013 10:56:08 +0000 (08:56 -0200)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 27 Nov 2013 11:24:40 +0000 (09:24 -0200)
commite01bb66931270eebf6f83e502309f1a9b4dfb8b9
tree70bcaa39cbce8e0cc34f3eef2c69fee1b9b438c0
parent57bfbae89b2e8e0f809ab1acd1812b5fb619bb87
libdvbv5: avoid playing with memory

Instead of reallocating the memory size for every single table,
just use the known size of the structure, as this is fixed.

The pat table here is an special case, due to the way its struct
is mapped. It is probably a good idea to use malloc there for the
struct dvb_table_pat_program program, but this would break compatibility
with libdvbv5 apps. So, let's keep it as-is.

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