mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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.
This commit is contained in:
parent
f15122e8a2
commit
d31e68d5d0
@ -30,7 +30,7 @@ static void add_user(garray_T *users, char *user, bool need_copy)
|
|||||||
|
|
||||||
if (user_copy == NULL || *user_copy == NUL) {
|
if (user_copy == NULL || *user_copy == NUL) {
|
||||||
if (need_copy) {
|
if (need_copy) {
|
||||||
xfree(user);
|
xfree(user_copy);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user