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:
parent
5044d1ff0b
commit
70520b51b9
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user