mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
caf.c : Fix a memory leak.
This commit is contained in:
parent
eebaf47a13
commit
2814d19a12
@ -5,6 +5,9 @@
|
||||
--enable-experimental was enabled. When OGG does finally work it will be
|
||||
merged.
|
||||
|
||||
* src/caf.c
|
||||
Fix a memory leak.
|
||||
|
||||
2005-10-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/g72x.c src/G72x/*.(c|h) src/common.h src/sndfile.c src/wav.c src/au.c
|
||||
|
@ -128,13 +128,6 @@ caf_open (SF_PRIVATE *psf)
|
||||
** By default, add the peak chunk to floating point files. Default behaviour
|
||||
** can be switched off using sf_command (SFC_SET_PEAK_CHUNK, SF_FALSE).
|
||||
*/
|
||||
if (psf->mode == SFM_WRITE && (subformat == SF_FORMAT_FLOAT || subformat == SF_FORMAT_DOUBLE))
|
||||
{ psf->peak_info = calloc (1, 2 * sizeof (int) * psf->sf.channels * sizeof (PEAK_POS)) ;
|
||||
if (psf->peak_info == NULL)
|
||||
return SFE_MALLOC_FAILED ;
|
||||
psf->peak_info->peak_loc = SF_PEAK_START ;
|
||||
} ;
|
||||
|
||||
if (psf->mode == SFM_WRITE && (subformat == SF_FORMAT_FLOAT || subformat == SF_FORMAT_DOUBLE))
|
||||
{ if ((psf->peak_info = peak_info_calloc (psf->sf.channels)) == NULL)
|
||||
return SFE_MALLOC_FAILED ;
|
||||
|
Loading…
Reference in New Issue
Block a user