ucm: check for valid value list before dereference.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
Liam Girdwood 2010-12-21 23:11:56 +01:00 committed by Jaroslav Kysela
parent 6cda65ba98
commit ebb52f6911

View file

@ -957,6 +957,9 @@ static int get_value1(const char **value, struct list_head *value_list,
struct ucm_value *val;
struct list_head *pos;
if (!value_list)
return -ENOENT;
list_for_each(pos, value_list) {
val = list_entry(pos, struct ucm_value, list);
if (check_identifier(identifier, val->name)) {