summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2010-08-21 02:51:48 +0200
committerFelix Fietkau <nbd@openwrt.org>2010-08-21 03:31:30 +0200
commit25f9dbfe7bba18ac6c9b2f31e55c19be57f4eee0 (patch)
tree437116466ba6eec56b234b684b0786805cf28d97
parentfcb93b2ca79dbddd7a8754f65d72b78c4d6c13b5 (diff)
downloaduci-25f9dbfe7bba18ac6c9b2f31e55c19be57f4eee0.tar.gz
ucimap: ucimap_parse: consider smap_offset when allocating the section data
Currently when there is no custom section data allocator the ucimap_section_data struct has to be at the beginning at the containing structure. This patch gets rid of that restriction by taking smap_offset into account. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
-rw-r--r--ucimap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ucimap.c b/ucimap.c
index 9853e7e..7c4fb02 100644
--- a/ucimap.c
+++ b/ucimap.c
@@ -884,6 +884,7 @@ ucimap_parse(struct uci_map *map, struct uci_package *pkg)
} else {
sd = malloc(sm->alloc_len);
memset(sd, 0, sm->alloc_len);
+ sd = ucimap_ptr_section(sm, sd);
}
if (!sd)
continue;