/*
- * $Id: main.c,v 1.18.6.2.2.1 2007-04-27 11:15:11 didg Exp $
+ * $Id: main.c,v 1.18.6.2.2.2 2007-04-27 21:29:16 didg Exp $
*
* Copyright (c) 1990,1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
}
#endif /* HAVE_CUPS */
-
/*
* If this fails, we've run out of sockets. Rather than
* just die(), let's try to continue. Maybe some sockets
*/
if ( atp_sresp( pr->p_atp, &atpb ) < 0 ) {
LOG(log_error, logtype_papd, "atp_sresp: %m" );
- continue;
+ err = 1;
}
if ( err ) {
+ if (atp) {
+ atp_close(atp);
+ }
continue;
}
switch ( c = fork()) {
case -1 :
LOG(log_error, logtype_papd, "fork: %m" );
+ atp_close(atp);
continue;
case 0 : /* child */