projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bypass 0 byte allocation when no domains are enabled
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
cmd.c
diff --git
a/src/bin/lttng-sessiond/cmd.c
b/src/bin/lttng-sessiond/cmd.c
index d882b074d54cd4f0348365ab4adb218ce263c48b..98e090539af0ecf7755abc2dfe1332b2f116f3fa 100644
(file)
--- a/
src/bin/lttng-sessiond/cmd.c
+++ b/
src/bin/lttng-sessiond/cmd.c
@@
-2388,6
+2388,10
@@
ssize_t cmd_list_domains(struct ltt_session *session,
}
}
+ if (!nb_dom) {
+ goto end;
+ }
+
*domains = zmalloc(nb_dom * sizeof(struct lttng_domain));
if (*domains == NULL) {
ret = LTTNG_ERR_FATAL;
@@
-2413,7
+2417,7
@@
ssize_t cmd_list_domains(struct ltt_session *session,
}
}
}
-
+end:
return nb_dom;
error:
This page took
0.02388 seconds
and
4
git commands to generate.