curl-util: fix use after free

This fixes a bug introduced by c3e658004a.
This commit is contained in:
Yu Watanabe 2019-02-06 16:18:58 +01:00
parent 9b5b4bed17
commit 67577508d8

View file

@ -291,7 +291,7 @@ int curl_glue_make(CURL **ret, const char *url, void *userdata) {
if (curl_easy_setopt(c, CURLOPT_FOLLOWLOCATION, 1L) != CURLE_OK)
return -EIO;
*ret = c;
*ret = TAKE_PTR(c);
return 0;
}