Browse Source

fix segfault in extended section lookup

Felix Fietkau 15 years ago
parent
commit
aa5b36c343
1 changed files with 2 additions and 1 deletions
  1. 2 1
      list.c

+ 2 - 1
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;
 }