mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-27 01:55:32 +03:00
systemd: fix segv in snapshot creation
https://bugs.freedesktop.org/show_bug.cgi?id=67848
This commit is contained in:
parent
608c3dc569
commit
ebec5783c4
@ -221,8 +221,10 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, DBusError *e, Sn
|
||||
if (asprintf(&n, "snapshot-%u.snapshot", ++ m->n_snapshots) < 0)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!manager_get_unit(m, n))
|
||||
if (!manager_get_unit(m, n)) {
|
||||
name = n;
|
||||
break;
|
||||
}
|
||||
|
||||
free(n);
|
||||
n = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user