Skip to content

Commit

Permalink
asus-wmi: potential NULL dereference in show_call()
Browse files Browse the repository at this point in the history
In the earlier check we assumed that "obj" could be NULL.  I looked at
some of the other places that call evaluate_object() and they check
for NULL as well.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Dan Carpenter authored and Matthew Garrett committed Mar 28, 2011
1 parent 0986f25 commit a1d6086
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/asus-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ static int show_call(struct seq_file *m, void *data)
else
seq_printf(m, "%#x(%#x, %#x) = t:%d\n", asus->debug.method_id,
asus->debug.dev_id, asus->debug.ctrl_param,
obj->type);
obj ? obj->type : -1);

kfree(obj);

Expand Down

0 comments on commit a1d6086

Please sign in to comment.