Browse code

mem: enhanced the warning message for free(0) of QM in debug mode

Daniel-Constantin Mierla authored on 02/10/2012 19:24:09
Showing 1 changed files
... ...
@@ -438,7 +438,11 @@ void qm_free(struct qm_block* qm, void* p)
438 438
 #endif
439 439
 
440 440
 	if (p==0) {
441
+#ifdef DBG_QM_MALLOC
442
+		LOG(L_WARN, "WARNING:qm_free: free(0) called from %s: %s(%d)\n", file, func, line);
443
+#else
441 444
 		LOG(L_WARN, "WARNING:qm_free: free(0) called\n");
445
+#endif
442 446
 		return;
443 447
 	}
444 448