From: Felix Fietkau Date: Tue, 5 Feb 2008 04:59:20 +0000 (+0100) Subject: add a missing nullpointer check X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=commitdiff_plain;h=a428a41ac99c2673409fc15dbbe6a4c8d897c7b6 add a missing nullpointer check --- 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;