mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-23 22:41:05 +01:00
cleanup: fix potential dereference
This commit is contained in:
parent
d98e1c854f
commit
14419cce34
@ -38,7 +38,7 @@ void decode_nwa(nwa_codec_data* data, sample_t* outbuf, int32_t samples_to_do) {
|
||||
nwa_codec_data* init_nwa(STREAMFILE* sf) {
|
||||
nwa_codec_data* data = NULL;
|
||||
|
||||
data = malloc(sizeof(nwa_codec_data));
|
||||
data = calloc(1, sizeof(nwa_codec_data));
|
||||
if (!data) goto fail;
|
||||
|
||||
data->nwa = nwalib_open(sf);
|
||||
|
Loading…
Reference in New Issue
Block a user