X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttngctl%2Flttngctl.c;h=4b803dc5b06e4ee76a56caf388d6af3b7911cd18;hp=b64ace2e6d80de0ce085791f698604e53f8eb523;hb=f8f0c3d1337c4eda5fb76a323ffe6c21c926a21e;hpb=00187dd4ee65fc3057ace02f8c954b9b457de6c4 diff --git a/liblttngctl/lttngctl.c b/liblttngctl/lttngctl.c index b64ace2e6..4b803dc5b 100644 --- a/liblttngctl/lttngctl.c +++ b/liblttngctl/lttngctl.c @@ -152,6 +152,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)); + if (!grp_list) { + ret = -1; + goto end; + } grp_id = getgroups(grp_list_size, grp_list); if (grp_id < -1) { perror("getgroups");