Commit 0049d4d1d2dd4cb6d65ea81ecdc8611a41f0bace

Ben Straub 2013-09-26T16:25:34

Make sure utility doesn't leak memory

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/tests-clar/network/urlparse.c b/tests-clar/network/urlparse.c
index 679197d..8892781 100644
--- a/tests-clar/network/urlparse.c
+++ b/tests-clar/network/urlparse.c
@@ -124,3 +124,12 @@ void test_network_urlparse__connection_data_http_downgrade(void)
 				"http://foo.com/bar/baz", NULL),
 			-1);
 }
+
+/* Run this under valgrind */
+void test_network_urlparse__connection_data_cleanup(void)
+{
+	cl_git_pass(gitno_connection_data_from_url(&conndata,
+				"http://foo.com/bar/baz/biff", "baz/biff"));
+	cl_git_pass(gitno_connection_data_from_url(&conndata,
+				"https://foo.com/bar/baz/biff", "baz/biff"));
+}