Make sure utility doesn't leak memory

This commit is contained in:
Ben Straub 2013-09-26 16:25:34 -07:00
parent 1b02baf40b
commit 0049d4d1d2

View File

@ -124,3 +124,12 @@ void test_network_urlparse__connection_data_http_downgrade(void)
"http://foo.com/bar/baz", NULL), "http://foo.com/bar/baz", NULL),
-1); -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"));
}