core/cgroup: first print then free

This commit is contained in:
Lukas Nykryn
2013-09-13 14:31:17 +02:00
committed by Lennart Poettering
parent df5f6971e6
commit 81c68af03f
Notes: Lennart Poettering 2013-10-04 17:11:46 +02:00
Backport: bugfix

View 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;
}