Merge pull request #4816 from libgit2/ethomson/test_leak online::clone: free url and username before resetting
diff --git a/tests/online/clone.c b/tests/online/clone.c
index de66238..09eff48 100644
--- a/tests/online/clone.c
+++ b/tests/online/clone.c
@@ -276,6 +276,9 @@ static int cred_failure_cb(
void test_online_clone__cred_callback_failure_return_code_is_tunnelled(void)
{
+ git__free(_remote_url);
+ git__free(_remote_user);
+
_remote_url = git__strdup("https://github.com/libgit2/non-existent");
_remote_user = git__strdup("libgit2test");
@@ -306,6 +309,9 @@ void test_online_clone__cred_callback_called_again_on_auth_failure(void)
{
size_t counter = 0;
+ git__free(_remote_url);
+ git__free(_remote_user);
+
_remote_url = git__strdup("https://github.com/libgit2/non-existent");
_remote_user = git__strdup("libgit2test");