From a292a0932d6e02e050ebf9065688098c69225f64 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 7 Nov 2009 11:47:58 +0200 Subject: [PATCH] Fix segfault. Sometimes tmp->op is '&' and tmp->type is EXPR_VALUE. Signed-off-by: Dan Carpenter --- check_null_deref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_null_deref.c b/check_null_deref.c index 5232fe9a..19a873f2 100644 --- a/check_null_deref.c +++ b/check_null_deref.c @@ -209,7 +209,7 @@ static void match_function_call_after(struct expression *expr) i = 0; FOR_EACH_PTR(expr->args, tmp) { tmp = strip_expr(tmp); - if (tmp->op == '&') { + if (tmp->type == EXPR_PREOP && tmp->op == '&') { set_state_expr(my_id, tmp->unop, &assumed_nonnull); } else if (func) { name = get_variable_from_expr(tmp, &sym); -- 2.11.4.GIT