OSDN Git Service

avcodec/hnm4video: allocate frame only when theres a coded frame
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 23 Nov 2013 19:48:35 +0000 (20:48 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 23 Nov 2013 20:05:29 +0000 (21:05 +0100)
commit321b33876262ad332b3030eb6e3d0739540e4209
tree7308283d8a522c55cd4751d23ebae126f71170b9
parent34e32d6464135a03da14d5b0aef1d42796939eae
avcodec/hnm4video: allocate frame only when theres a coded frame

Fixes memleak
Fixes: asan_heap-oob_e76bdf_2224_MOTHOO.HNM

This patch also removes the setting of palette_has_changed,
which was set on a frame that was never returned

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hnm4video.c