neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit d31e68d5d0d05fc51db01d85a6d02c01e9fa2559
parent f15122e8a2938b0a440aa3d834f6648537f1951f
Author: James McCoy <jamessan@jamessan.com>
Date:   Thu, 19 May 2022 22:23:17 -0400

fix(cid/348314): free user_copy, not user

user is passed in by the caller, which we internally copy.  We should be
freeing our copy, not the caller's string.

Diffstat:
Msrc/nvim/os/users.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nvim/os/users.c b/src/nvim/os/users.c @@ -30,7 +30,7 @@ static void add_user(garray_T *users, char *user, bool need_copy) if (user_copy == NULL || *user_copy == NUL) { if (need_copy) { - xfree(user); + xfree(user_copy); } return; }