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:
James McCoy 2022-05-19 22:23:17 -04:00
parent f15122e8a2
commit d31e68d5d0
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -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;
}