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/indent_c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/indent_c.c') diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c index 3b9214abc1..c0613331cf 100644 --- a/src/nvim/indent_c.c +++ b/src/nvim/indent_c.c @@ -136,7 +136,7 @@ bool cin_is_cinword(char_u *line) } } - free(cinw_buf); + xfree(cinw_buf); return retval; } @@ -3280,7 +3280,7 @@ theend: /* put the cursor back where it belongs */ curwin->w_cursor = cur_curpos; - free(linecopy); + xfree(linecopy); if (amount < 0) return 0; -- cgit