projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add missing error handling in liblttngctl
[lttng-tools.git]
/
liblttngctl
/
lttngctl.c
diff --git
a/liblttngctl/lttngctl.c
b/liblttngctl/lttngctl.c
index 42f3ad2ae9950729c3c53922c759d53173d59ee5..c2b1242d8c4897c6df6c912e2f6131f36ad6a895 100644
(file)
--- a/
liblttngctl/lttngctl.c
+++ b/
liblttngctl/lttngctl.c
@@
-153,6
+153,10
@@
static int check_tracing_group(const char *grp_name)
/* Alloc group list of the right size */
grp_list = malloc(grp_list_size * sizeof(gid_t));
/* Alloc group list of the right size */
grp_list = malloc(grp_list_size * sizeof(gid_t));
+ if (!grp_list) {
+ ret = -1;
+ goto end;
+ }
grp_id = getgroups(grp_list_size, grp_list);
if (grp_id < -1) {
perror("getgroups");
grp_id = getgroups(grp_list_size, grp_list);
if (grp_id < -1) {
perror("getgroups");
This page took
0.024941 seconds
and
4
git commands to generate.