diff options
Diffstat (limited to 'tests/clar_libgit2.c')
-rw-r--r-- | tests/clar_libgit2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/clar_libgit2.c b/tests/clar_libgit2.c index 9640b9265..10f37ad5c 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; } |