chiark / gitweb /
core/cgroup: first print then free
authorLukas Nykryn <lnykryn@redhat.com>
Fri, 13 Sep 2013 12:31:17 +0000 (14:31 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 13 Sep 2013 12:40:58 +0000 (14:40 +0200)
src/core/cgroup.c

index 244baff..1f41efc 100644 (file)
@@ -402,8 +402,8 @@ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) {
                 is_in_hash = true;
 
         if (r < 0) {
-                free(path);
                 log_error("cgroup %s exists already: %s", path, strerror(-r));
+                free(path);
                 return r;
         }