summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getpwent.c
diff options
context:
space:
mode:
authormpp <mpp@FreeBSD.org>1996-01-29 20:16:30 +0000
committermpp <mpp@FreeBSD.org>1996-01-29 20:16:30 +0000
commitbc3d519a691dae27cb75aacccb78a04639023aed (patch)
tree514db827db4058ae63ccd368c0c7db5ab20e49fb /lib/libc/gen/getpwent.c
parent12324b6255a831161c8eba00dbe6b0b633095518 (diff)
downloadFreeBSD-src-bc3d519a691dae27cb75aacccb78a04639023aed.zip
FreeBSD-src-bc3d519a691dae27cb75aacccb78a04639023aed.tar.gz
Getpwent() and getservent() can wind up calling free() with
an invalid pointer if a call to yp_first() fails. Closes PR # 964, and possibly # 952.
Diffstat (limited to 'lib/libc/gen/getpwent.c')
-rw-r--r--lib/libc/gen/getpwent.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index a3e32ad..70a2c98 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -650,7 +650,6 @@ _havemaster(char *_pw_yp_domain)
if (yp_first(_pw_yp_domain, "master.passwd.byname",
&key, &keylen, &result, &resultlen)) {
- free(result);
return 0;
}
free(result);
OpenPOWER on IntegriCloud