aboutsummaryrefslogtreecommitdiffstats
path: root/codecs/codec_lpc10.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-21 08:45:39 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-21 08:45:39 +0000
commit52fb5814943bd6d7d314d8f88dbd71b2c8d61c24 (patch)
tree63ee48c5830529cb1e1026badc6d3695fea22919 /codecs/codec_lpc10.c
parent41cb10c7565fb6d43d5d0c705f422d99d7d152ff (diff)
conversions to use allocation wrappers (issue #6277)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8381 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs/codec_lpc10.c')
-rw-r--r--codecs/codec_lpc10.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/codecs/codec_lpc10.c b/codecs/codec_lpc10.c
index 8eeecdef0..fe37383a7 100644
--- a/codecs/codec_lpc10.c
+++ b/codecs/codec_lpc10.c
@@ -45,6 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
+#include "asterisk/utils.h"
#include "lpc10/lpc10.h"
@@ -87,9 +88,8 @@ struct ast_translator_pvt {
static struct ast_translator_pvt *lpc10_enc_new(void)
{
- struct lpc10_coder_pvt *tmp;
- tmp = malloc(sizeof(struct lpc10_coder_pvt));
- if (tmp) {
+ struct lpc10_coder_pvt *tmp;
+ if ((tmp = ast_malloc(sizeof(*tmp)))) {
if (!(tmp->lpc10.enc = create_lpc10_encoder_state())) {
free(tmp);
tmp = NULL;
@@ -103,9 +103,8 @@ static struct ast_translator_pvt *lpc10_enc_new(void)
static struct ast_translator_pvt *lpc10_dec_new(void)
{
- struct lpc10_coder_pvt *tmp;
- tmp = malloc(sizeof(struct lpc10_coder_pvt));
- if (tmp) {
+ struct lpc10_coder_pvt *tmp;
+ if ((tmp = ast_malloc(sizeof(*tmp)))) {
if (!(tmp->lpc10.dec = create_lpc10_decoder_state())) {
free(tmp);
tmp = NULL;