Add missing error handling in liblttngctl
[lttng-tools.git] / liblttngctl / lttngctl.c
index 42f3ad2ae9950729c3c53922c759d53173d59ee5..c2b1242d8c4897c6df6c912e2f6131f36ad6a895 100644 (file)
@@ -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));
+       if (!grp_list) {
+               ret = -1;
+               goto end;
+       }
        grp_id = getgroups(grp_list_size, grp_list);
        if (grp_id < -1) {
                perror("getgroups");
This page took 0.02271 seconds and 4 git commands to generate.