Commit a1264cb7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

url: fix leak

parent 908430dd
...@@ -80,11 +80,12 @@ static inline void test_path (const char *in, const char *out) ...@@ -80,11 +80,12 @@ static inline void test_path (const char *in, const char *out)
static inline void test_current_directory_path (const char *in, const char *cwd, const char *out) static inline void test_current_directory_path (const char *in, const char *cwd, const char *out)
{ {
char * expected_result = NULL; char *expected_result;
int val = asprintf(&expected_result, "file://%s/%s", cwd, out); int val = asprintf (&expected_result, "file://%s/%s", cwd, out);
assert (val != -1); assert (val != -1);
test (make_URI_def, in, expected_result); test (make_URI_def, in, expected_result);
free(expected_result);
} }
static void test_url_parse(const char* in, const char* protocol, const char* user, static void test_url_parse(const char* in, const char* protocol, const char* user,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment