Module: sip-router
Branch: master
Commit: 41fa8653157a989ed1a77f72b25a20fd984b999d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=41fa865…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Oct 2 21:24:09 2012 +0200
mem: enhanced the warning message for free(0) of QM in debug mode
---
mem/q_malloc.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/mem/q_malloc.c b/mem/q_malloc.c
index 4649474..497c3f9 100644
--- a/mem/q_malloc.c
+++ b/mem/q_malloc.c
@@ -438,7 +438,11 @@ void qm_free(struct qm_block* qm, void* p)
#endif
if (p==0) {
+#ifdef DBG_QM_MALLOC
+ LOG(L_WARN, "WARNING:qm_free: free(0) called from %s: %s(%d)\n", file, func,
line);
+#else
LOG(L_WARN, "WARNING:qm_free: free(0) called\n");
+#endif
return;
}