diff options
| author | Philip Kelley <phkelley@hotmail.com> | 2013-01-25 22:43:52 -0500 |
|---|---|---|
| committer | Philip Kelley <phkelley@hotmail.com> | 2013-01-25 22:43:52 -0500 |
| commit | cfc39f5078ecea864d78d349264eb259d4604363 (patch) | |
| tree | a0277845b0a5e2a6279b03306ca176ba72b936f7 | |
| parent | ae386101d249f77039f5b00ada190132acad90a8 (diff) | |
| download | libgit2-cfc39f5078ecea864d78d349264eb259d4604363.tar.gz | |
Fix 3 memory leaks
| -rw-r--r-- | src/netops.c | 1 | ||||
| -rw-r--r-- | tests-clar/checkout/crlf.c | 1 | ||||
| -rw-r--r-- | tests-clar/network/remotes.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/src/netops.c b/src/netops.c index fe95f2ca7..59e6bda1e 100644 --- a/src/netops.c +++ b/src/netops.c @@ -487,6 +487,7 @@ int gitno_connect(gitno_socket *s_out, const char *host, const char *port, int f /* Oops, we couldn't connect to any address */ if (s == INVALID_SOCKET && p == NULL) { giterr_set(GITERR_OS, "Failed to connect to %s", host); + p_freeaddrinfo(info); return -1; } diff --git a/tests-clar/checkout/crlf.c b/tests-clar/checkout/crlf.c index a4eb2d3e0..856d32bd1 100644 --- a/tests-clar/checkout/crlf.c +++ b/tests-clar/checkout/crlf.c @@ -21,6 +21,7 @@ void test_checkout_crlf__initialize(void) g_repo = cl_git_sandbox_init("crlf"); cl_git_pass(git_repository_head_tree(&tree, g_repo)); + git_tree_free(tree); } void test_checkout_crlf__cleanup(void) diff --git a/tests-clar/network/remotes.c b/tests-clar/network/remotes.c index 9be18baea..85df03417 100644 --- a/tests-clar/network/remotes.c +++ b/tests-clar/network/remotes.c @@ -78,6 +78,7 @@ void test_network_remotes__error_when_no_push_available(void) cl_git_fail_with(git_push_finish(p), GIT_ERROR); git_push_free(p); + t->free(t); git_remote_free(r); } |
