aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/expression.c
diff options
authorChristopher Li <sparse@chrisli.org>2013-02-23 11:34:57 -0800
committerChristopher Li <sparse@chrisli.org>2013-02-23 11:34:57 -0800
commitff3cebd3ddd065b489378e858d3055b7db4254e1 (patch)
treed524fffd01fda0ccf7ac5856c99fbb0dcd9b1800 /expression.c
parent609bc05d78a9cacc7f3e10d12164d6d3b0e8d712 (diff)
downloadsparse-dev-ff3cebd3ddd065b489378e858d3055b7db4254e1.tar.gz
Fix segfault cause by fucntion without ident.
This allow compile "drivers/usb/core/hub.c" without sefault. Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'expression.c')
-rw-r--r--expression.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/expression.c b/expression.c
index d2437c74..5eb5cbf7 100644
--- a/expression.c
+++ b/expression.c
@@ -77,7 +77,7 @@ static struct symbol *handle_func(struct token *token)
ident != &__PRETTY_FUNCTION___ident)
return NULL;
- if (!current_fn)
+ if (!current_fn || !current_fn->ident)
return NULL;
/* OK, it's one of ours */