mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
More movements of spandsp to the sue of custom allocation routines
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/alloc.h"
|
||||
#include "spandsp/async.h"
|
||||
#include "spandsp/crc.h"
|
||||
#include "spandsp/bit_operations.h"
|
||||
@@ -314,7 +315,7 @@ SPAN_DECLARE(hdlc_rx_state_t *) hdlc_rx_init(hdlc_rx_state_t *s,
|
||||
{
|
||||
if (s == NULL)
|
||||
{
|
||||
if ((s = (hdlc_rx_state_t *) malloc(sizeof(*s))) == NULL)
|
||||
if ((s = (hdlc_rx_state_t *) span_alloc(sizeof(*s))) == NULL)
|
||||
return NULL;
|
||||
}
|
||||
memset(s, 0, sizeof(*s));
|
||||
@@ -350,7 +351,7 @@ SPAN_DECLARE(int) hdlc_rx_release(hdlc_rx_state_t *s)
|
||||
|
||||
SPAN_DECLARE(int) hdlc_rx_free(hdlc_rx_state_t *s)
|
||||
{
|
||||
free(s);
|
||||
span_free(s);
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
@@ -592,7 +593,7 @@ SPAN_DECLARE(hdlc_tx_state_t *) hdlc_tx_init(hdlc_tx_state_t *s,
|
||||
{
|
||||
if (s == NULL)
|
||||
{
|
||||
if ((s = (hdlc_tx_state_t *) malloc(sizeof(*s))) == NULL)
|
||||
if ((s = (hdlc_tx_state_t *) span_alloc(sizeof(*s))) == NULL)
|
||||
return NULL;
|
||||
}
|
||||
memset(s, 0, sizeof(*s));
|
||||
@@ -624,7 +625,7 @@ SPAN_DECLARE(int) hdlc_tx_release(hdlc_tx_state_t *s)
|
||||
|
||||
SPAN_DECLARE(int) hdlc_tx_free(hdlc_tx_state_t *s)
|
||||
{
|
||||
free(s);
|
||||
span_free(s);
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
Reference in New Issue
Block a user