mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user