From 34c48aaf123ffd8aec31b79f0b4d16d9a63fe59b Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Sun, 12 Apr 2015 11:37:22 -0300 Subject: memory: Add `free` wrapper and refactor project to use it We already use wrappers for allocation, the new `xfree` function is the equivalent for deallocation and provides a way to fully replace the malloc implementation used by Neovim. --- src/nvim/strings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/strings.c') diff --git a/src/nvim/strings.c b/src/nvim/strings.c index dd10184d38..4e70f48860 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -269,7 +269,7 @@ char_u *strup_save(const char_u *orig) memcpy(s, res, (size_t)(p - res)); STRCPY(s + (p - res) + newl, p + l); p = s + (p - res); - free(res); + xfree(res); res = s; } -- cgit