Browse Source

add a missing nullpointer check

Felix Fietkau 16 years ago
parent
commit
a428a41ac9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      list.c

+ 2 - 0
list.c

@@ -218,6 +218,8 @@ int uci_lookup(struct uci_context *ctx, struct uci_element **res, struct uci_pac
 	if (option) {
 		s = uci_to_section(e);
 		e = uci_lookup_list(ctx, &s->options, option);
+		if (!e)
+			goto notfound;
 	}
 
 	*res = e;