mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-15 05:48:33 +00:00
Moved a lot of spandsp to the use of custom allocation functions
This commit is contained in:
1 parent
7c744ce1d8
commit
d5e4089c22
46 files changed
+233
-187
No files matched your search
@@ -33,6 +33,7 @@
|
||||
#include <memory.h>
|
||||
|
||||
#include "spandsp/telephony.h"
|
||||
#include "spandsp/alloc.h"
|
||||
#include "spandsp/logging.h"
|
||||
#include "spandsp/schedule.h"
|
||||
|
||||
@@ -53,7 +54,7 @@ SPAN_DECLARE(int) span_schedule_event(span_sched_state_t *s, int us, span_sched_
|
||||
if (i >= s->allocated)
|
||||
{
|
||||
s->allocated += 5;
|
||||
s->sched = (span_sched_t *) realloc(s->sched, sizeof(span_sched_t)*s->allocated);
|
||||
s->sched = (span_sched_t *) span_realloc(s->sched, sizeof(span_sched_t)*s->allocated);
|
||||
}
|
||||
/*endif*/
|
||||
if (i >= s->max_to_date)
|
||||
@@ -141,7 +142,7 @@ SPAN_DECLARE(int) span_schedule_release(span_sched_state_t *s)
|
||||
{
|
||||
if (s->sched)
|
||||
{
|
||||
free(s->sched);
|
||||
span_free(s->sched);
|
||||
s->sched = NULL;
|
||||
}
|
||||
return 0;
|
||||
@@ -152,7 +153,7 @@ SPAN_DECLARE(int) span_schedule_free(span_sched_state_t *s)
|
||||
{
|
||||
span_schedule_release(s);
|
||||
if (s)
|
||||
free(s);
|
||||
span_free(s);
|
||||
return 0;
|
||||
}
|
||||
/*- End of function --------------------------------------------------------*/
|
||||
|
||||
Reference in new issue
Block a user