ibuf = (char *) malloc( 2048 );
if( gptr->flags & GIF_SHUTDOWN ) { // cannot do if we should shutdown
+ free( ibuf );
return SI_ERROR; // so just get out
}
if( gptr->magicnum != MAGICNUM ) { // if not a valid ginfo block
rmr_vlog( RMR_VL_CRIT, "SI95: wait: bad global info struct magic number is wrong\n" );
+ free( ibuf );
return SI_ERROR;
}
}
if( pstat > 0 && (! (gptr->flags & GIF_SHUTDOWN)) ) {
- for( tpptr = gptr->tplist; tpptr != NULL; tpptr = nextone ) {
+ tpptr = gptr->tplist;
+ while( tpptr != NULL ) {
nextone = tpptr->next; // prevent issues if we delete the block during loop
if( tpptr->fd >= 0 ) {
}
}
} // if still good fd
+
+ tpptr = nextone;
}
}
} while( gptr->tplist != NULL && !(gptr->flags & GIF_SHUTDOWN) );