[Tarantool-patches] [PATCH v2 08/10] box: add param_list to 'struct func'

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sat Aug 22 17:30:24 MSK 2020


Thanks for the patch!

> diff --git a/src/box/alter.cc b/src/box/alter.cc
> index ba96d9c62..0914a7615 100644
> --- a/src/box/alter.cc
> +++ b/src/box/alter.cc
> @@ -3293,7 +3293,11 @@ func_def_new_from_tuple(struct tuple *tuple)
>  		diag_set(OutOfMemory, def_sz, "malloc", "def");
>  		return NULL;
>  	}
> -	auto def_guard = make_scoped_guard([=] { free(def); });
> +	def->param_list = NULL;
> +	auto def_guard = make_scoped_guard([=] {
> +		free(def->param_list);
> +		free(def);
> +	});

Would be better to patch func_def_sizeof() and allocate in one block.


More information about the Tarantool-patches mailing list