projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
308253c
)
cgtop: fix ret pointer usage (#3443)
author
Alessandro Puccetti
<alessandro@kinvolk.io>
Mon, 6 Jun 2016 10:38:23 +0000
(12:38 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 6 Jun 2016 10:38:23 +0000
(12:38 +0200)
src/cgtop/cgtop.c
patch
|
blob
|
history
diff --git
a/src/cgtop/cgtop.c
b/src/cgtop/cgtop.c
index
b4a982c
..
6bd2288
100644
(file)
--- a/
src/cgtop/cgtop.c
+++ b/
src/cgtop/cgtop.c
@@
-868,13
+868,15
@@
static int get_cgroup_root(char **ret) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_free_ char *unit = NULL, *path = NULL;
+ char *aux;
const char *m;
int r;
if (arg_root) {
-
*ret
= strdup(arg_root);
- if (!
*ret
)
+
aux
= strdup(arg_root);
+ if (!
aux
)
return log_oom();
+ *ret = aux;
return 0;
}