diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-08-06 21:30:34 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-08-06 21:30:48 -0400 |
commit | ebec5783c4ff847d09816860261bbea34287ddf4 (patch) | |
tree | d494fe142af7fef2d27363faddcf1b24c378119b /src/core/snapshot.c | |
parent | 608c3dc5693177d9c297753a63349135a8edd76f (diff) |
systemd: fix segv in snapshot creation
https://bugs.freedesktop.org/show_bug.cgi?id=67848
Diffstat (limited to 'src/core/snapshot.c')
-rw-r--r-- | src/core/snapshot.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/snapshot.c b/src/core/snapshot.c index 1423854098..d11239dff3 100644 --- a/src/core/snapshot.c +++ b/src/core/snapshot.c @@ -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; |