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.
This commit is contained in:
Mike Pritchard 1996-01-29 20:16:30 +00:00
parent 5044d1ff0b
commit 70520b51b9
2 changed files with 0 additions and 2 deletions

View File

@ -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);

View File

@ -78,7 +78,6 @@ _getypservent(line)
free(key);
if ((rv = yp_first(yp_domain, "services.byname", &key, &keylen,
&result, &resultlen))) {
free(result);
serv_stepping_yp = 0;
return(0);
}