diff options
-rw-r--r-- | bin/title.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/title.c b/bin/title.c index d5238b1a..0168e2c9 100644 --- a/bin/title.c +++ b/bin/title.c @@ -127,8 +127,12 @@ static CURLcode fetchTitle(const char *url) { char *dest; curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &dest); + dest = strdup(dest); + if (!dest) err(EX_OSERR, "strdup"); + code = curl_easy_setopt(curl, CURLOPT_URL, dest); if (code) return code; + free(dest); body.len = 0; title = false; |