summaryrefslogtreecommitdiff
path: root/codecs/codec_gsm.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-01-21 08:45:39 +0000
committerRussell Bryant <russell@russellbryant.com>2006-01-21 08:45:39 +0000
commitfbdc8ce317eacca50018748cb850ef317964af21 (patch)
tree63ee48c5830529cb1e1026badc6d3695fea22919 /codecs/codec_gsm.c
parent24999261956367679ceaca57d626a113ebaecfc5 (diff)
conversions to use allocation wrappers (issue #6277)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'codecs/codec_gsm.c')
-rw-r--r--codecs/codec_gsm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c
index b8afd3bd7..ee28e852d 100644
--- a/codecs/codec_gsm.c
+++ b/codecs/codec_gsm.c
@@ -44,6 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
+#include "asterisk/utils.h"
#ifdef USE_EXTERNAL_GSM_LIB
#include <gsm/gsm.h>
@@ -81,9 +82,8 @@ struct ast_translator_pvt {
static struct ast_translator_pvt *gsm_new(void)
{
- struct gsm_coder_pvt *tmp;
- tmp = malloc(sizeof(struct gsm_coder_pvt));
- if (tmp) {
+ struct gsm_coder_pvt *tmp;
+ if ((tmp = ast_malloc(sizeof(*tmp)))) {
if (!(tmp->gsm = gsm_create())) {
free(tmp);
tmp = NULL;