summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-08-06 21:30:34 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-08-06 21:30:48 -0400
commitebec5783c4ff847d09816860261bbea34287ddf4 (patch)
treed494fe142af7fef2d27363faddcf1b24c378119b /src
parent608c3dc5693177d9c297753a63349135a8edd76f (diff)
systemd: fix segv in snapshot creation
https://bugs.freedesktop.org/show_bug.cgi?id=67848
Diffstat (limited to 'src')
-rw-r--r--src/core/snapshot.c4
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;