Browse Source

ucimap: fix a memory leak (patch by Stanislav Fomichev)

Felix Fietkau 12 years ago
parent
commit
5077cdcee2
1 changed files with 2 additions and 0 deletions
  1. 2 0
      ucimap.c

+ 2 - 0
ucimap.c

@@ -712,6 +712,8 @@ ucimap_parse_section(struct uci_map *map, struct uci_sectionmap *sm, struct ucim
 	return 0;
 
 error_mem:
+	if (sd->alloc_custom)
+		free(sd->alloc_custom);
 	if (sd->allocmap)
 		free(sd->allocmap);
 	free(sd);