Don't dereference a pointer after freeing that pointer.
PR: 27990 Reviewed by: dd, phk Tested by: dd MFC after: 2 weeks
This commit is contained in:
parent
8e81760b1a
commit
b12f647365
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78674
@ -394,7 +394,7 @@ char **argv;
|
|||||||
int i;
|
int i;
|
||||||
DIR *dird;
|
DIR *dird;
|
||||||
struct dirent *dirp;
|
struct dirent *dirp;
|
||||||
struct _dom_binding *ypdb;
|
struct _dom_binding *ypdb, *next;
|
||||||
|
|
||||||
/* Check that another ypbind isn't already running. */
|
/* Check that another ypbind isn't already running. */
|
||||||
if ((yplockfd = (open(YPBINDLOCK, O_RDONLY|O_CREAT, 0444))) == -1)
|
if ((yplockfd = (open(YPBINDLOCK, O_RDONLY|O_CREAT, 0444))) == -1)
|
||||||
@ -493,7 +493,8 @@ char **argv;
|
|||||||
syslog(LOG_WARNING, "select: %m");
|
syslog(LOG_WARNING, "select: %m");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
for(ypdb=ypbindlist; ypdb; ypdb=ypdb->dom_pnext) {
|
for(ypdb=ypbindlist; ypdb; ypdb=next) {
|
||||||
|
next = ypdb->dom_pnext;
|
||||||
if (READFD > 0 && FD_ISSET(READFD, &fdsr)) {
|
if (READFD > 0 && FD_ISSET(READFD, &fdsr)) {
|
||||||
handle_children(ypdb);
|
handle_children(ypdb);
|
||||||
if (children == (MAX_CHILDREN - 1))
|
if (children == (MAX_CHILDREN - 1))
|
||||||
|
Loading…
Reference in New Issue
Block a user