diff --git a/src/http.c b/src/http.c index 3cafd1c4..6ac795bf 100644 --- a/src/http.c +++ b/src/http.c @@ -2263,8 +2263,7 @@ check_file_output (struct url *u, struct http_stat *hs, hs->temporary = opt.delete_after || opt.spider || !acceptable (hs->local_file); if (hs->temporary) { - char *tmp = NULL; - asprintf (&tmp, "%s.tmp", hs->local_file); + char *tmp = aprintf ("%s.tmp", hs->local_file); xfree (hs->local_file); hs->local_file = tmp; }