diff options
-rw-r--r-- | src/input/http_helper.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/input/http_helper.c b/src/input/http_helper.c index 4883763b0..279d3ff05 100644 --- a/src/input/http_helper.c +++ b/src/input/http_helper.c @@ -240,8 +240,7 @@ char *_x_canonicalise_url (const char *base, const char *url) { ++cut; } base_length = cut ? (size_t)(cut - base) : strlen (base); - ret = malloc (base_length + strlen (url) + 1); - sprintf (ret, "%.*s%s", (int)base_length, base, url); + asprintf (&ret, "%.*s%s", (int)base_length, base, url); return ret; } |