summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common/setgroups.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-20 20:39:38 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-20 20:39:38 +0000
commit88917b0f143e2eac468aea14338b4d9eddba389d (patch)
tree790fd49f0632b93a7ad9cd02974bff82efa60b25 /libc/sysdeps/linux/common/setgroups.c
parent43eb269ab1d216074e18dadc74c9671398dfe938 (diff)
downloaduClibc-alpine-88917b0f143e2eac468aea14338b4d9eddba389d.tar.bz2
uClibc-alpine-88917b0f143e2eac468aea14338b4d9eddba389d.tar.xz
replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe.
Diffstat (limited to 'libc/sysdeps/linux/common/setgroups.c')
-rw-r--r--libc/sysdeps/linux/common/setgroups.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/setgroups.c b/libc/sysdeps/linux/common/setgroups.c
index 7bfcc6c20..eb5245d59 100644
--- a/libc/sysdeps/linux/common/setgroups.c
+++ b/libc/sysdeps/linux/common/setgroups.c
@@ -56,8 +56,7 @@ ret_error:
}
i = __syscall_setgroups(size, kernel_groups);
- if (kernel_groups)
- free(kernel_groups);
+ free(kernel_groups);
return i;
}
}