projects
/
ircu2.10.12-pk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid crashes when handling ET_EOF for IAuth stderr before stdout.
[ircu2.10.12-pk.git]
/
ircd
/
s_auth.c
diff --git
a/ircd/s_auth.c
b/ircd/s_auth.c
index 924bd50ab13dcc36df46936301348155a327312d..95e7d5ca1741f7c17f267c68aeeb53933e3b0b27 100644
(file)
--- a/
ircd/s_auth.c
+++ b/
ircd/s_auth.c
@@
-1373,19
+1373,19
@@
static void iauth_disconnect(struct IAuth *iauth)
if (iauth == NULL)
return;
if (iauth == NULL)
return;
- /* Close main socket. */
- if (s_fd(i_socket(iauth)) != -1) {
- close(s_fd(i_socket(iauth)));
- socket_del(i_socket(iauth));
- s_fd(i_socket(iauth)) = -1;
- }
-
/* Close error socket. */
if (s_fd(i_stderr(iauth)) != -1) {
close(s_fd(i_stderr(iauth)));
socket_del(i_stderr(iauth));
s_fd(i_stderr(iauth)) = -1;
}
/* Close error socket. */
if (s_fd(i_stderr(iauth)) != -1) {
close(s_fd(i_stderr(iauth)));
socket_del(i_stderr(iauth));
s_fd(i_stderr(iauth)) = -1;
}
+
+ /* Close main socket. */
+ if (s_fd(i_socket(iauth)) != -1) {
+ close(s_fd(i_socket(iauth)));
+ socket_del(i_socket(iauth));
+ s_fd(i_socket(iauth)) = -1;
+ }
}
/** Close all %IAuth connections marked as closing. */
}
/** Close all %IAuth connections marked as closing. */