Add missing error handling in liblttngctl
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 20 Aug 2011 20:28:00 +0000 (16:28 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 20 Aug 2011 20:28:00 +0000 (16:28 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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.032774 seconds and 4 git commands to generate.