teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame 0003-core-cgroup-first-print-then-free.patch

Harald Hoyer d4ee25
From 89ad78921a404dc82f22862f2354707199ea1616 Mon Sep 17 00:00:00 2001
Harald Hoyer d4ee25
From: Lukas Nykryn <lnykryn@redhat.com>
Harald Hoyer d4ee25
Date: Fri, 13 Sep 2013 14:31:17 +0200
Harald Hoyer d4ee25
Subject: [PATCH] core/cgroup: first print then free
Harald Hoyer d4ee25
Harald Hoyer d4ee25
---
Harald Hoyer d4ee25
 src/core/cgroup.c | 2 +-
Harald Hoyer d4ee25
 1 file changed, 1 insertion(+), 1 deletion(-)
Harald Hoyer d4ee25
Harald Hoyer d4ee25
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
Harald Hoyer d4ee25
index 3eeb475..513450a 100644
Harald Hoyer d4ee25
--- a/src/core/cgroup.c
Harald Hoyer d4ee25
+++ b/src/core/cgroup.c
Harald Hoyer d4ee25
@@ -395,8 +395,8 @@ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) {
Harald Hoyer d4ee25
                 is_in_hash = true;
Harald Hoyer d4ee25
 
Harald Hoyer d4ee25
         if (r < 0) {
Harald Hoyer d4ee25
-                free(path);
Harald Hoyer d4ee25
                 log_error("cgroup %s exists already: %s", path, strerror(-r));
Harald Hoyer d4ee25
+                free(path);
Harald Hoyer d4ee25
                 return r;
Harald Hoyer d4ee25
         }
Harald Hoyer d4ee25