From 0cc6050300b0e6b53b750e3bd017c1eca9a072dc Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Mon, 26 May 2014 13:39:19 -0300 Subject: [PATCH] API: Bugfix: Remove memory leak from set_option_to --- src/nvim/api/private/helpers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index 206129dd78..861ac8cc1b 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -267,6 +267,7 @@ void set_option_to(void *to, int type, String name, Object value, Error *err) char *val = xstrndup(value.data.string.data, value.data.string.size); set_option_value_for(key, 0, val, opt_flags, type, to, err); + free(val); } cleanup: