From: Ben Pfaff Date: Wed, 23 Feb 2011 18:31:41 +0000 (-0800) Subject: leak-checker: Avoid printing freed pointer. X-Git-Tag: v1.1.0~228 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=93e039fb5e7ae77a556e1d144ca069a86555598b;p=sliver-openvswitch.git leak-checker: Avoid printing freed pointer. I think that this will work OK, and it should avoid complaints from static checkers about using a freed pointer. Coverity #11069. --- diff --git a/lib/leak-checker.c b/lib/leak-checker.c index 8b7818244..42b3818ab 100644 --- a/lib/leak-checker.c +++ b/lib/leak-checker.c @@ -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(); }