[systemd-devel] [PATCH] core/cgroup: first print then free

Lennart Poettering lennart at poettering.net
Fri Sep 13 05:41:58 PDT 2013


On Fri, 13.09.13 14:31, Lukas Nykryn (lnykryn at redhat.com) wrote:

Thanks! Applied!

> ---
>  src/core/cgroup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/core/cgroup.c b/src/core/cgroup.c
> index 3eeb475..513450a 100644
> --- a/src/core/cgroup.c
> +++ b/src/core/cgroup.c
> @@ -395,8 +395,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;
>          }
>  


Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list