win32: remember to free wide env name/value
diff --git a/tests/clar_libgit2.c b/tests/clar_libgit2.c
index 9640b92..10f37ad 100644
--- a/tests/clar_libgit2.c
+++ b/tests/clar_libgit2.c
@@ -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;
}