Commit 80b01c8f by Edward Thomson

win32: remember to free wide env name/value

parent c251f3bb
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment