mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
echo-cancel: Fix a crash is speex cleanup
If module initialisation fails, the speex done() function might try to free a value that's not been allocated yet. Adding protection for this condition.
This commit is contained in:
parent
9e78de2da2
commit
b0f5b8d2fa
1 changed files with 2 additions and 1 deletions
|
|
@ -109,6 +109,7 @@ void pa_speex_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *p
|
|||
}
|
||||
|
||||
void pa_speex_ec_done(pa_echo_canceller *ec) {
|
||||
speex_echo_state_destroy(ec->params.priv.speex.state);
|
||||
if (ec->params.priv.speex.state)
|
||||
speex_echo_state_destroy(ec->params.priv.speex.state);
|
||||
ec->params.priv.speex.state = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue