Moved a lot of spandsp to the use of custom allocation functions

This commit is contained in:
Steve Underwood committed 2013-08-06 00:49:15 +08:00
1 parent 7c744ce1d8
commit d5e4089c22
46 files changed
+233 -187

No files matched your search

+3 -2
View File
@@ -41,6 +41,7 @@
#include <assert.h>
#include "spandsp/telephony.h"
#include "spandsp/alloc.h"
#include "spandsp/logging.h"
#include "spandsp/bit_operations.h"
#include "spandsp/async.h"
@@ -1509,7 +1510,7 @@ SPAN_DECLARE(v42_state_t *) v42_init(v42_state_t *ss,
if (ss == NULL)
{
if ((ss = (v42_state_t *) malloc(sizeof(*ss))) == NULL)
if ((ss = (v42_state_t *) span_alloc(sizeof(*ss))) == NULL)
return NULL;
}
memset(ss, 0, sizeof(*ss));
@@ -1564,7 +1565,7 @@ SPAN_DECLARE(int) v42_release(v42_state_t *s)
SPAN_DECLARE(int) v42_free(v42_state_t *s)
{
v42_release(s);
free(s);
span_free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/