From ac5114fdf74099a8ce8b9c154231e226e6883b94 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 13 Mar 2020 19:22:39 +0300 Subject: [magi] --- src/param.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/param.c') diff --git a/src/param.c b/src/param.c index dd89a48..9c94555 100644 --- a/src/param.c +++ b/src/param.c @@ -19,6 +19,9 @@ void magi_params_set(magi_params **params, magi_param *newitem) if (!*params) { magi_params_add(params, newitem); } else if (!strcmp((*params)->item.name, newitem->name)) { + free((*params)->item.name); + free((*params)->item.data); + (*params)->item.name = newitem->name; (*params)->item.data = newitem->data; } else { magi_params_set(&(*params)->next, newitem); -- cgit v1.2.3