aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alEffect.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-08-03 17:36:42 -0700
committerChris Robinson <[email protected]>2016-08-03 17:36:42 -0700
commit3b2d8d394984da94fd286c5d57dfd68f22e2740b (patch)
treed668459e2dec5ea2295d3e05211b1a571b1a3d77 /OpenAL32/alEffect.c
parent2b3c7f211c45616826f0fda721b2ccd3fe53f13a (diff)
Use al_calloc/al_free in more places
Diffstat (limited to 'OpenAL32/alEffect.c')
-rw-r--r--OpenAL32/alEffect.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c
index 32053325..65a4dcb6 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.c
@@ -60,11 +60,11 @@ AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects)
device = context->Device;
for(cur = 0;cur < n;cur++)
{
- ALeffect *effect = calloc(1, sizeof(ALeffect));
+ ALeffect *effect = al_calloc(16, sizeof(ALeffect));
ALenum err = AL_OUT_OF_MEMORY;
if(!effect || (err=InitEffect(effect)) != AL_NO_ERROR)
{
- free(effect);
+ al_free(effect);
alDeleteEffects(cur, effects);
SET_ERROR_AND_GOTO(context, err, done);
}
@@ -76,7 +76,7 @@ AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects)
{
FreeThunkEntry(effect->id);
memset(effect, 0, sizeof(ALeffect));
- free(effect);
+ al_free(effect);
alDeleteEffects(cur, effects);
SET_ERROR_AND_GOTO(context, err, done);
@@ -115,7 +115,7 @@ AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, const ALuint *effects)
FreeThunkEntry(effect->id);
memset(effect, 0, sizeof(*effect));
- free(effect);
+ al_free(effect);
}
done:
@@ -381,7 +381,7 @@ ALvoid ReleaseALEffects(ALCdevice *device)
// Release effect structure
FreeThunkEntry(temp->id);
memset(temp, 0, sizeof(ALeffect));
- free(temp);
+ al_free(temp);
}
}