diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2010-08-21 02:51:48 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-08-21 03:31:30 +0200 |
commit | 25f9dbfe7bba18ac6c9b2f31e55c19be57f4eee0 (patch) | |
tree | 437116466ba6eec56b234b684b0786805cf28d97 | |
parent | fcb93b2ca79dbddd7a8754f65d72b78c4d6c13b5 (diff) | |
download | uci-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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |