From aa5b36c343894dc01ab857f0c7ab3aa1a792fc05 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 27 Aug 2008 21:38:54 +0200 Subject: [PATCH] fix segfault in extended section lookup --- list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.11.0