summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-27 21:38:54 +0200
committerFelix Fietkau <nbd@openwrt.org>2008-08-27 21:38:54 +0200
commitaa5b36c343894dc01ab857f0c7ab3aa1a792fc05 (patch)
tree2c62b078681f77319abd40fc50cca552cecb2e1e
parente2b1433becc57039b3bae198f063e0aa976c4fd5 (diff)
downloaduci-aa5b36c343894dc01ab857f0c7ab3aa1a792fc05.tar.gz
fix segfault in extended section lookup
-rw-r--r--list.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/list.c b/list.c
index c4b84e2..0ddf409 100644
--- a/list.c
+++ b/list.c
@@ -358,7 +358,8 @@ error:
UCI_THROW(ctx, UCI_ERR_INVAL);
done:
free(section);
- ptr->section = e->name;
+ if (e)
+ ptr->section = e->name;
return e;
}