summaryrefslogtreecommitdiff
path: root/src/udev/libudev-util-private.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/libudev-util-private.c')
-rw-r--r--src/udev/libudev-util-private.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/udev/libudev-util-private.c b/src/udev/libudev-util-private.c
index 2b2752bb54..44ff02cc33 100644
--- a/src/udev/libudev-util-private.c
+++ b/src/udev/libudev-util-private.c
@@ -143,14 +143,13 @@ gid_t util_lookup_group(struct udev *udev, const char *group)
struct group *gr;
gid_t gid = 0;
size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
- char *buf = alloca(buflen);
+ char *buf = NULL;
if (strcmp(group, "root") == 0)
return 0;
gid = strtoul(group, &endptr, 10);
if (endptr[0] == '\0')
return gid;
- buf = NULL;
gid = 0;
for (;;) {
char *newbuf;