diff options
author | Chris Robinson <[email protected]> | 2017-04-07 09:49:06 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-07 09:49:06 -0700 |
commit | 7fd88086f67c6dd1fd006178c9d1a3457837ccd3 (patch) | |
tree | 15b44945155e276600e1b7026697541e94b1d515 /Alc | |
parent | 8f2e4d46ec2de3c813438c363919a3da6aab7a4f (diff) |
Make sure malloc succeeded for 'delays'
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/hrtf.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -419,7 +419,7 @@ static struct Hrtf *LoadHrtf00(const ALubyte *data, size_t datalen, const char * { coeffs = malloc(sizeof(coeffs[0])*irSize*irCount); delays = malloc(sizeof(delays[0])*irCount); - if(coeffs == NULL) + if(coeffs == NULL || delays == NULL) { ERR("Out of memory.\n"); failed = AL_TRUE; @@ -583,7 +583,7 @@ static struct Hrtf *LoadHrtf01(const ALubyte *data, size_t datalen, const char * coeffs = malloc(sizeof(coeffs[0])*irSize*irCount); delays = malloc(sizeof(delays[0])*irCount); - if(coeffs == NULL) + if(coeffs == NULL || delays == NULL) { ERR("Out of memory.\n"); failed = AL_TRUE; |