From: Felix Fietkau Date: Sun, 6 Sep 2009 17:07:21 +0000 (+0200) Subject: ucimap: fix list initialization X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7791a9603c3932e6f90d4ac711f7fa2eeb1044bd;p=uci.git ucimap: fix list initialization --- diff --git a/ucimap.c b/ucimap.c index b477264..c7adacd 100644 --- a/ucimap.c +++ b/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); }