summaryrefslogtreecommitdiff
path: root/src/udev/libudev-util-private.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-04-13 15:08:55 +0200
committerKay Sievers <kay@vrfy.org>2012-04-13 15:10:12 +0200
commitb49d9b50cfd377f28de0886330ba7bbd231fb472 (patch)
tree19135b6b49048e05a884efa07454ee1728d094b4 /src/udev/libudev-util-private.c
parent7ea07dcddafe573c699fc48171b57b912897e7e2 (diff)
udev: fix a few issues detected by the llvm static analyzer
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;