From b3032146e544627082a88af3bff60b8af0a0f9b3 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Thu, 4 Jan 2007 21:58:42 +0000 Subject: [PATCH] don't mark these allocations as 'cache' allocations when caching has been disabled git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49536 614ede4d-c843-0410-af14-a771ab80d22e --- channels/iax2-parser.c | 8 ++++++-- main/frame.c | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/channels/iax2-parser.c b/channels/iax2-parser.c index 319d4caaa..35575c988 100644 --- a/channels/iax2-parser.c +++ b/channels/iax2-parser.c @@ -959,13 +959,17 @@ struct iax_frame *iax_frame_new(int direction, int datalen, unsigned int cacheab } AST_LIST_TRAVERSE_SAFE_END } -#endif - if (!fr) { if (!(fr = ast_calloc_cache(1, sizeof(*fr) + datalen))) return NULL; fr->mallocd_datalen = datalen; } +#else + if (!(fr = ast_calloc(1, sizeof(*fr) + datalen))) + return NULL; + fr->mallocd_datalen = datalen; +#endif + fr->direction = direction; fr->retrans = -1; diff --git a/main/frame.c b/main/frame.c index 0cf11981f..83599fff8 100644 --- a/main/frame.c +++ b/main/frame.c @@ -300,10 +300,12 @@ static struct ast_frame *ast_frame_header_new(void) return f; } } -#endif - if (!(f = ast_calloc_cache(1, sizeof(*f)))) return NULL; +#else + if (!(f = ast_calloc(1, sizeof(*f)))) + return NULL; +#endif f->mallocd_hdr_len = sizeof(*f); #ifdef TRACE_FRAMES -- 2.11.4.GIT