From 041c1a793665c0929430c4c6fc13890b39e54492 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 30 Jan 2010 22:11:51 +0300 Subject: [PATCH] check_memory: only load kernel.frees_argument when checking the kernel Signed-off-by: Dan Carpenter --- check_memory.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/check_memory.c b/check_memory.c index 8adf7028..825f9772 100644 --- a/check_memory.c +++ b/check_memory.c @@ -446,9 +446,10 @@ void check_memory(int id) add_hook(&match_assign, ASSIGNMENT_HOOK); add_hook(&match_return, RETURN_HOOK); add_hook(&match_end_func, END_FUNC_HOOK); - if (option_project == PROJ_KERNEL) + if (option_project == PROJ_KERNEL) { add_function_hook("kfree", &match_free_func, (void *)0); - else + register_funcs_from_file(); + } else { add_function_hook("free", &match_free_func, (void *)0); - register_funcs_from_file(); + } } -- 2.11.4.GIT