mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-31 04:13:47 +01:00
Fix speex segfault on init fail with bad data
This commit is contained in:
parent
0e22f0b95c
commit
82518328ed
@ -179,8 +179,10 @@ void free_speex(speex_codec_data* data) {
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
speex_decoder_destroy(data->state);
|
||||
speex_bits_destroy(&data->bits);
|
||||
if (data->state) {
|
||||
speex_decoder_destroy(data->state);
|
||||
speex_bits_destroy(&data->bits);
|
||||
}
|
||||
|
||||
free(data->samples);
|
||||
free(data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user