src/flac.c: Fix a memory leak 16/211316/1
authorErik de Castro Lopo <erikd@mega-nerd.com>
Wed, 12 Apr 2017 09:10:40 +0000 (19:10 +1000)
committerSeungbae Shin <seungbae.shin@samsung.com>
Thu, 1 Aug 2019 09:01:21 +0000 (18:01 +0900)
commit1c81499460ca59c16be4d24efce4c0dd91f4ae55
tree92e5db7a5b7818784aba16387ef0f3cd389fea7a
parentfc5e950c648623779b0ba2e82bff9a558403e1e7
src/flac.c: Fix a memory leak

The pflac->rbuffer pointer array was being allocated in two
places, but only one of them (the one that was kept) was checking
to ensure the pointers were NULL before allocation.

Leak was found by fuzzing the sndfile-resample binary compiled
with ASAN.

Change-Id: Ie5bafb97aeefc38afbb13f3ac668ccbc34da986c
src/flac.c