summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-02-05 05:59:20 +0100
committerFelix Fietkau <nbd@openwrt.org>2008-02-05 05:59:20 +0100
commita428a41ac99c2673409fc15dbbe6a4c8d897c7b6 (patch)
tree3910f1bd2ac7e8058547ebd0d0a5781d6ba3ba4f
parentcba72526bbd55932caf58bcb673b8fa8b1b98c89 (diff)
downloaduci-0.2.3.tar.gz
add a missing nullpointer checkv0.2.3
-rw-r--r--list.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/list.c b/list.c
index e817118..15f544e 100644
--- a/list.c
+++ b/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;