diff options
Diffstat (limited to 'src/cgtop/cgtop.c')
-rw-r--r-- | src/cgtop/cgtop.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index b4a982ce38..c67b328b38 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -872,9 +872,13 @@ static int get_cgroup_root(char **ret) { int r; if (arg_root) { - *ret = strdup(arg_root); - if (!*ret) + char *aux; + + aux = strdup(arg_root); + if (!aux) return log_oom(); + + *ret = aux; return 0; } |