summaryrefslogtreecommitdiff
path: root/include/asterisk/config.h
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-10-14 22:38:06 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-10-14 22:38:06 +0000
commitd5837ba8c275b75388815a3263dae97cf306161b (patch)
tree96325674713833036b2bd7758905df5ccb47ca65 /include/asterisk/config.h
parentc6caf2a06fb2e316ac8b23561955ea95f7bc7598 (diff)
Add additional memory debugging to several core APIs, and fix several memory
leaks found with these changes. (Closes issue #13505, closes issue #13543) Reported by: mav3rick, triccyx Patches: 20081001__bug13505.diff.txt uploaded by Corydon76 (license 14) Tested by: mav3rick, triccyx git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/config.h')
-rw-r--r--include/asterisk/config.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asterisk/config.h b/include/asterisk/config.h
index bd030a76e..de42f2563 100644
--- a/include/asterisk/config.h
+++ b/include/asterisk/config.h
@@ -364,7 +364,12 @@ void ast_category_destroy(struct ast_category *cat);
struct ast_variable *ast_category_detach_variables(struct ast_category *cat);
void ast_category_rename(struct ast_category *cat, const char *name);
+#ifdef MALLOC_DEBUG
+struct ast_variable *_ast_variable_new(const char *name, const char *value, const char *filename, const char *file, const char *function, int lineno);
+#define ast_variable_new(a, b, c) _ast_variable_new(a, b, c, __FILE__, __PRETTY_FUNCTION__, __LINE__)
+#else
struct ast_variable *ast_variable_new(const char *name, const char *value, const char *filename);
+#endif
struct ast_config_include *ast_include_new(struct ast_config *conf, const char *from_file, const char *included_file, int is_exec, const char *exec_file, int from_lineno, char *real_included_file_name, int real_included_file_name_size);
struct ast_config_include *ast_include_find(struct ast_config *conf, const char *included_file);
void ast_include_rename(struct ast_config *conf, const char *from_file, const char *to_file);