mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 17:40:58 +00:00
[SNDREC32]
Don't double free buffers in case of failure svn path=/trunk/; revision=73208
This commit is contained in:
parent
3d204aa2b1
commit
d121793bd6
|
@ -126,10 +126,16 @@ audio_resampler_acm::close(void)
|
|||
{
|
||||
/* Free buffer memory */
|
||||
if (acm_header.pbSrc != 0)
|
||||
{
|
||||
delete[] acm_header.pbSrc;
|
||||
acm_header.pbSrc = 0;
|
||||
}
|
||||
|
||||
if (acm_header.pbDst != 0)
|
||||
{
|
||||
delete[] acm_header.pbDst;
|
||||
acm_header.pbDst = 0;
|
||||
}
|
||||
|
||||
/* Re-init structures */
|
||||
init_();
|
||||
|
@ -147,10 +153,16 @@ audio_resampler_acm::close(void)
|
|||
{
|
||||
/* Free buffer memory */
|
||||
if (acm_header.pbSrc != 0)
|
||||
{
|
||||
delete[] acm_header.pbSrc;
|
||||
acm_header.pbSrc = 0;
|
||||
}
|
||||
|
||||
if (acm_header.pbDst != 0)
|
||||
{
|
||||
delete[] acm_header.pbDst;
|
||||
acm_header.pbDst = 0;
|
||||
}
|
||||
|
||||
/* Re-init structures */
|
||||
init_();
|
||||
|
|
Loading…
Reference in a new issue