]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
import/pull-oci: fix several OOM checks
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Tue, 24 Feb 2026 14:26:16 +0000 (15:26 +0100)
committerMike Yuan <me@yhndnzj.com>
Tue, 24 Feb 2026 16:34:09 +0000 (17:34 +0100)
Follow-up for a9f6ba04969d6eb2e629e30299fab7538ef42a57

src/import/pull-oci.c

index 6ab58eb1ac0e4dd206c2884758b9456043ec6813..e9e0a1c6b34193c28d37e4f5dc9bdd8353cffef4 100644 (file)
@@ -997,7 +997,7 @@ static int oci_pull_save_nspawn_settings(OciPull *i) {
                 return log_oom();
 
         _cleanup_free_ char *j = path_join(i->image_root, fn);
-        if (!fn)
+        if (!j)
                 return log_oom();
 
         _cleanup_fclose_ FILE *f = NULL;
@@ -1085,7 +1085,7 @@ static int oci_pull_save_oci_config(OciPull *i) {
                 return log_oom();
 
         _cleanup_free_ char *j = path_join(i->image_root, fn);
-        if (!fn)
+        if (!j)
                 return log_oom();
 
         _cleanup_close_ int fd = -EBADF;
@@ -1116,7 +1116,7 @@ static int oci_pull_save_mstack(OciPull *i) {
                 return log_oom();
 
         _cleanup_free_ char *j = path_join(i->image_root, dn);
-        if (!dn)
+        if (!j)
                 return log_oom();
 
         log_notice("Creating '%s'", j);