Browse Source

ucimap: fix list initialization

Felix Fietkau 14 years ago
parent
commit
7791a9603c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ucimap.c

+ 1 - 1
ucimap.c

@@ -650,8 +650,8 @@ ucimap_parse_section(struct uci_map *map, struct uci_sectionmap *sm, struct ucim
 			if (!data->list)
 				goto error_mem;
 
-			data->list->size = n_elements;
 			memset(data->list, 0, size);
+			data->list->size = n_elements;
 		} else {
 			ucimap_count_alloc(om, &n_alloc, &n_alloc_custom);
 		}