From 25f9dbfe7bba18ac6c9b2f31e55c19be57f4eee0 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Sat, 21 Aug 2010 02:51:48 +0200 Subject: [PATCH 1/1] 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 --- ucimap.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.11.0