]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
curl-util: fix use after free 11659/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 6 Feb 2019 15:18:58 +0000 (16:18 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 6 Feb 2019 15:19:02 +0000 (16:19 +0100)
This fixes a bug introduced by c3e658004a66115fa09abcf602d573e65e577aa9.

src/import/curl-util.c

index 360628fe440a753fbd59f61b1ae873f5e9976bbd..7db03b291916524cd30ec9456cf154f18e54b2ca 100644 (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;
 }