]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pull: fix invalid error check
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 6 Feb 2019 15:17:59 +0000 (16:17 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 6 Feb 2019 15:18:01 +0000 (16:18 +0100)
This fixes a bug introduced by 0d94088e4e9e00f5ca9afdb8e68c94558fe23268.

src/import/pull-job.c

index a44e0a7eda9e305b4f6290cee36a4d89950ccd68..6881bd627f30453af52357621ddb07fefced6c7b 100644 (file)
@@ -537,7 +537,7 @@ int pull_job_new(PullJob **ret, const char *url, CurlGlue *glue, void *userdata)
         assert(ret);
 
         u = strdup(url);
-        if (u)
+        if (!u)
                 return -ENOMEM;
 
         j = new(PullJob, 1);