[systemd-commits] src/core

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Tue Aug 6 18:31:39 PDT 2013


 src/core/snapshot.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit ebec5783c4ff847d09816860261bbea34287ddf4
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Aug 6 21:30:34 2013 -0400

    systemd: fix segv in snapshot creation
    
    https://bugs.freedesktop.org/show_bug.cgi?id=67848

diff --git a/src/core/snapshot.c b/src/core/snapshot.c
index 1423854..d11239d 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;



More information about the systemd-commits mailing list