mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-26 10:03:40 +03:00
machined: simplification
This commit is contained in:
parent
13790add4b
commit
17a20d6491
@ -202,6 +202,9 @@ int machine_save(Machine *m) {
|
||||
goto finish;
|
||||
}
|
||||
|
||||
free(temp_path);
|
||||
temp_path = NULL;
|
||||
|
||||
if (m->unit) {
|
||||
char *sl;
|
||||
|
||||
@ -213,12 +216,11 @@ int machine_save(Machine *m) {
|
||||
}
|
||||
|
||||
finish:
|
||||
if (r < 0) {
|
||||
if (temp_path)
|
||||
unlink(temp_path);
|
||||
if (temp_path)
|
||||
unlink(temp_path);
|
||||
|
||||
if (r < 0)
|
||||
log_error_errno(r, "Failed to save machine data %s: %m", m->state_file);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user