]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/import/curl-util.c
tree-wide: use TAKE_PTR() and TAKE_FD() macros
[thirdparty/systemd.git] / src / import / curl-util.c
index 62bbaa500da680cbf0a61a0cbcb4ccc734543bae..94315f1f7bb2e13bd7f5c80bb24ee389a667f47b 100644 (file)
@@ -272,8 +272,7 @@ int curl_glue_new(CurlGlue **glue, sd_event *event) {
         if (curl_multi_setopt(g->curl, CURLMOPT_TIMERFUNCTION, curl_glue_timer_callback) != CURLM_OK)
                 return -EINVAL;
 
-        *glue = g;
-        g = NULL;
+        *glue = TAKE_PTR(g);
 
         return 0;
 }