]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/import/pull-raw.c
Replace free and reassignment with free_and_replace
[thirdparty/systemd.git] / src / import / pull-raw.c
index 8cab72495c5b80ba299684e3b972b17ae19b7c33..880cb84ba845f09b65fb5f2c53e670cbeb0e7d59 100644 (file)
@@ -269,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;