mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 01:49:53 +00:00
sfprocess: Fix memory leaks
This commit is contained in:
parent
b2998c9fc6
commit
0956676eb1
@ -98,12 +98,14 @@ main (void)
|
|||||||
|
|
||||||
if (sfinfo.channels > MAX_CHANNELS)
|
if (sfinfo.channels > MAX_CHANNELS)
|
||||||
{ printf ("Not able to process more than %d channels\n", MAX_CHANNELS) ;
|
{ printf ("Not able to process more than %d channels\n", MAX_CHANNELS) ;
|
||||||
|
sf_close (infile) ;
|
||||||
return 1 ;
|
return 1 ;
|
||||||
} ;
|
} ;
|
||||||
/* Open the output file. */
|
/* Open the output file. */
|
||||||
if (! (outfile = sf_open (outfilename, SFM_WRITE, &sfinfo)))
|
if (! (outfile = sf_open (outfilename, SFM_WRITE, &sfinfo)))
|
||||||
{ printf ("Not able to open output file %s.\n", outfilename) ;
|
{ printf ("Not able to open output file %s.\n", outfilename) ;
|
||||||
puts (sf_strerror (NULL)) ;
|
puts (sf_strerror (NULL)) ;
|
||||||
|
sf_close (infile) ;
|
||||||
return 1 ;
|
return 1 ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user