X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fleak-checker.c;h=1fd3d5b5fb656b36cabdf7417ecf477d86a82738;hb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;hp=4ab55e59493f2303b279bfa45a3eaed57a1d5ad6;hpb=a0bc29a541fc7dc6e20137d5558e2094d614e6ab;p=sliver-openvswitch.git diff --git a/lib/leak-checker.c b/lib/leak-checker.c index 4ab55e594..1fd3d5b5f 100644 --- a/lib/leak-checker.c +++ b/lib/leak-checker.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,10 +18,10 @@ #include "leak-checker.h" #include #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(); }