summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-09-24 23:59:12 +1000
committerGitHub <noreply@github.com>2018-09-24 23:59:12 +1000
commitb3e6ef92637303749359b7302de3f90e16083349 (patch)
treee77c6543e5bf94ad01bb5298c700bb0ccf4e35e9 /tests
parenta54043b7f9ceef2ed370933c2d58c7fb96c68011 (diff)
parente84914fd30edc6702e368c8ccfc77dc5607c213c (diff)
downloadlibgit2-b3e6ef92637303749359b7302de3f90e16083349.tar.gz
Merge pull request #4816 from libgit2/ethomson/test_leak
online::clone: free url and username before resetting
Diffstat (limited to 'tests')
-rw-r--r--tests/online/clone.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/online/clone.c b/tests/online/clone.c
index de66238e3..09eff4823 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");