Prepare Open vSwitch 1.1.2 release.
[sliver-openvswitch.git] / lib / leak-checker.c
index 4ab55e5..42b3818 100644 (file)
 #include "leak-checker.h"
 #include <inttypes.h>
 #include "backtrace.h"
-
-#define THIS_MODULE VLM_leak_checker
 #include "vlog.h"
 
+VLOG_DEFINE_THIS_MODULE(leak_checker);
+
 #ifndef HAVE_MALLOC_HOOKS
 void
 leak_checker_start(const char *file_name OVS_UNUSED)
@@ -216,11 +216,10 @@ hook_free(void *p, const void *caller OVS_UNUSED)
     }
 
     set_hooks(&libc_hooks);
+    log_callers("free(%p)", p);
     free(p);
     get_hooks(&libc_hooks);
 
-    log_callers("free(%p)", p);
-
     reset_hooks();
 }