1
1
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:
Zbigniew Jędrzejewski-Szmek 2013-08-06 21:30:34 -04:00
parent 608c3dc569
commit ebec5783c4

View File

@ -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;