From 3f94c3bd6bd7c59181021601bbbeba89e376770b Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Tue, 5 May 2009 13:23:27 +0000 Subject: [PATCH] Merged revisions 192357 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r192357 | kpfleming | 2009-05-05 15:18:21 +0200 (Tue, 05 May 2009) | 5 lines Correct some flaws in the memory accounting code for stringfields and ao2 objects Under some conditions, the memory allocation for stringfields and ao2 objects would not have supplied valid file/function names for MALLOC_DEBUG tracking, so this commit corrects that. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@192358 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/stringfields.h | 2 +- main/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/asterisk/stringfields.h b/include/asterisk/stringfields.h index f3b44fd942..03b573287a 100644 --- a/include/asterisk/stringfields.h +++ b/include/asterisk/stringfields.h @@ -243,7 +243,7 @@ void __ast_string_field_ptr_build_va(struct ast_string_field_mgr *mgr, /*! \brief free all memory - to be called before destroying the object */ #define ast_string_field_free_memory(x) \ - __ast_string_field_init(&(x)->__field_mgr, &(x)->__field_mgr_pool, -1, NULL, 0, NULL) + __ast_string_field_init(&(x)->__field_mgr, &(x)->__field_mgr_pool, -1, __FILE__, __LINE__, __PRETTY_FUNCTION__) /*! * \internal diff --git a/main/utils.c b/main/utils.c index 8aba624d8a..554da57d84 100644 --- a/main/utils.c +++ b/main/utils.c @@ -1468,7 +1468,7 @@ ast_string_field __ast_string_field_alloc_space(struct ast_string_field_mgr *mgr if (add_string_pool(mgr, pool_head, new_size, mgr->owner_file, mgr->owner_line, mgr->owner_func)) return NULL; #else - if (add_string_pool(mgr, pool_head, new_size, NULL, 0, NULL)) + if (add_string_pool(mgr, pool_head, new_size, __FILE__, __LINE__, __FUNCTION__)) return NULL; #endif }