diff options
author | 2014-01-22 09:58:28 +0000 | |
---|---|---|
committer | 2014-01-22 09:58:28 +0000 | |
commit | 2aeedd392249533444e077a60ad691ab1a478d29 (patch) | |
tree | 956a2ff6f575a07597ee5657ba892f431d5e97b6 /lib/libc | |
parent | fix a leak (diff) | |
download | wireguard-openbsd-2aeedd392249533444e077a60ad691ab1a478d29.tar.xz wireguard-openbsd-2aeedd392249533444e077a60ad691ab1a478d29.zip |
fix a leak in getgrouplist()
problem reproduced and fix verified by schwarze who wrote the code
ok krw@ deraadt@ schwarze@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/getgrouplist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index 237abec4eeb..37d321bdb45 100644 --- a/lib/libc/gen/getgrouplist.c +++ b/lib/libc/gen/getgrouplist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getgrouplist.c,v 1.22 2013/04/17 17:40:35 tedu Exp $ */ +/* $OpenBSD: getgrouplist.c,v 1.23 2014/01/22 09:58:28 jsg Exp $ */ /* * Copyright (c) 2008 Ingo Schwarze <schwarze@usta.de> * Copyright (c) 1991, 1993 @@ -215,6 +215,7 @@ getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt) ret = -1; /* FALLTHROUGH */ case 1: + free(key); goto out; default: break; |