projects
/
platform
/
upstream
/
libsndfile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7c5cc3
)
src/flac.c: Fix another memory leak
18/211318/1
author
Erik de Castro Lopo
<erikd@mega-nerd.com>
Wed, 12 Apr 2017 10:19:34 +0000
(20:19 +1000)
committer
Seungbae Shin
<seungbae.shin@samsung.com>
Thu, 1 Aug 2019 09:02:23 +0000
(18:02 +0900)
When the FLAC decoder was passed a malformed file, the associated
`FLAC__StreamDecoder` object was not getting released.
Change-Id: I81216cb4ea9c69e79f8dcedc0ad2b81c6e0a2d7d
Closes: https://github.com/erikd/libsndfile/issues/233
src/flac.c
patch
|
blob
|
history
diff --git
a/src/flac.c
b/src/flac.c
index
adc67f5
..
2992f4c
100644
(file)
--- a/
src/flac.c
+++ b/
src/flac.c
@@
-841,7
+841,9
@@
flac_read_header (SF_PRIVATE *psf)
psf_log_printf (psf, "End\n") ;
- if (psf->error == 0)
+ if (psf->error != 0)
+ FLAC__stream_decoder_delete (pflac->fsd) ;
+ else
{ FLAC__uint64 position ;
FLAC__stream_decoder_get_decode_position (pflac->fsd, &position) ;