]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
don't mark these allocations as 'cache' allocations when caching has been disabled
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 4 Jan 2007 21:58:42 +0000 (21:58 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 4 Jan 2007 21:58:42 +0000 (21:58 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@49536 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/iax2-parser.c
main/frame.c

index 319d4caaa96405d9818794fcc5369d1b1eea3871..35575c9889cdf02e09b2b244fc56876decec8c34 100644 (file)
@@ -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;
index 0cf11981feb1bfe6abc1e0d17fd318a970404e20..83599fff87f60cce5512be2c7b35d6e32408b09d 100644 (file)
@@ -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