mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 22:55:47 +00:00
win32: remember to free wide env name/value
This commit is contained in:
parent
c251f3bbe7
commit
80b01c8f26
@ -80,7 +80,7 @@ char *cl_getenv(const char *name)
|
||||
|
||||
int cl_setenv(const char *name, const char *value)
|
||||
{
|
||||
wchar_t *wide_name, *wide_value;
|
||||
wchar_t *wide_name, *wide_value = NULL;
|
||||
|
||||
cl_assert(git__utf8_to_16_alloc(&wide_name, name) >= 0);
|
||||
|
||||
@ -95,6 +95,8 @@ int cl_setenv(const char *name, const char *value)
|
||||
SetEnvironmentVariableW(wide_name, NULL);
|
||||
}
|
||||
|
||||
git__free(wide_name);
|
||||
git__free(wide_value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user