summaryrefslogtreecommitdiff
path: root/src/import/pull-raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/pull-raw.c')
-rw-r--r--src/import/pull-raw.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/import/pull-raw.c b/src/import/pull-raw.c
index b45ac814a9..880cb84ba8 100644
--- a/src/import/pull-raw.c
+++ b/src/import/pull-raw.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
@@ -268,9 +269,7 @@ static int raw_pull_maybe_convert_qcow2(RawPull *i) {
}
(void) unlink(i->temp_path);
- free(i->temp_path);
- i->temp_path = t;
- t = NULL;
+ free_and_replace(i->temp_path, t);
safe_close(i->raw_job->disk_fd);
i->raw_job->disk_fd = converted_fd;