diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-01-22 09:58:29 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-01-22 09:58:29 +0000 |
commit | e8f5a0631a1b55f1bfcdb1a456326fefba7befbb (patch) | |
tree | c7061da66e14cc80ac0c9441947b38c4506075f7 | |
parent | 15e3d9454346b5e184fc8c76955e9a18d8cd91b7 (diff) |
fix a leak in getgrouplist()
problem reproduced and fix verified by schwarze who wrote the code
ok krw@ deraadt@ schwarze@
-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; |