diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-08-18 21:49:13 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-08-18 21:49:13 +0200 |
commit | 236f7468c5eb30f1381a7059cf780b7fe173ec48 (patch) | |
tree | 4bfc2fec3c83cf08b090e838ff2d8e69997e91df | |
parent | a7b730e73b1714c7522283924174340877228748 (diff) | |
download | uci-236f7468c5eb30f1381a7059cf780b7fe173ec48.tar.gz |
fix wrong buffer allocation
-rw-r--r-- | list.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -469,7 +469,7 @@ int uci_add_element_list(struct uci_context *ctx, struct uci_option *o, const ch if (!internal && p->has_history) uci_add_history(ctx, &p->history, UCI_CMD_LIST_ADD, s->e.name, o->e.name, value); - e = uci_alloc_generic(ctx, UCI_TYPE_ITEM, value, 0); + e = uci_alloc_generic(ctx, UCI_TYPE_ITEM, value, sizeof(struct uci_option)); uci_list_add(&o->v.list, &e->list); return 0; |