# [PATCH] Fix memory leak in git_connect with CONNECT_DIAG_URL

1 messages from 2016-04-28 to 2016-04-28. Participants: Mike Hommey.
Thread: https://gitlist.dev/t/42167

## Mike Hommey, 2016-04-28 09:19

Subject: [PATCH] Fix memory leak in git_connect with CONNECT_DIAG_URL
Message-ID: <1461835155-15485-1-git-send-email-mh@glandium.org>
URL: https://gitlist.dev/e/1461835155-15485-1-git-send-email-mh%40glandium.org

```
Signed-off-by: Mike Hommey <mh@glandium.org>
---
 connect.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/connect.c b/connect.c
index c53f3f1..dccf673 100644
--- a/connect.c
+++ b/connect.c
@@ -755,6 +755,7 @@ struct child_process *git_connect(int fd[2], const char *url,
 				free(hostandport);
 				free(path);
 				free(conn);
+				strbuf_release(&cmd);
 				return NULL;
 			}
 
-- 
2.8.1.5.g18c8a48

```
