mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
conversions to use allocation wrappers (issue #6277)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -75,6 +75,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/options.h"
|
||||
#include "asterisk/logger.h"
|
||||
#include "asterisk/channel.h"
|
||||
#include "asterisk/utils.h"
|
||||
|
||||
/* Sample frame data */
|
||||
#include "slin_speex_ex.h"
|
||||
@@ -111,9 +112,8 @@ struct ast_translator_pvt {
|
||||
|
||||
static struct ast_translator_pvt *lintospeex_new(void)
|
||||
{
|
||||
struct speex_coder_pvt *tmp;
|
||||
tmp = malloc(sizeof(struct speex_coder_pvt));
|
||||
if (tmp) {
|
||||
struct speex_coder_pvt *tmp;
|
||||
if ((tmp = ast_malloc(sizeof(*tmp)))) {
|
||||
if (!(tmp->speex = speex_encoder_init(&speex_nb_mode))) {
|
||||
free(tmp);
|
||||
tmp = NULL;
|
||||
@@ -158,9 +158,8 @@ static struct ast_translator_pvt *lintospeex_new(void)
|
||||
|
||||
static struct ast_translator_pvt *speextolin_new(void)
|
||||
{
|
||||
struct speex_coder_pvt *tmp;
|
||||
tmp = malloc(sizeof(struct speex_coder_pvt));
|
||||
if (tmp) {
|
||||
struct speex_coder_pvt *tmp;
|
||||
if ((tmp = ast_malloc(sizeof(*tmp)))) {
|
||||
if (!(tmp->speex = speex_decoder_init(&speex_nb_mode))) {
|
||||
free(tmp);
|
||||
tmp = NULL;
|
||||
|
Reference in New Issue
Block a user