diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-13 11:04:33 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-13 11:04:33 +0000 |
commit | 17f36a76cbf15e088d2973ed5608f93e09827f8a (patch) | |
tree | b6c13e0b6552821b39770011e161d46f8b647065 /tcps_sess.c | |
parent | 49c52d090aea8dc898cc855278b1054daff1461f (diff) | |
download | rsyslog-17f36a76cbf15e088d2973ed5608f93e09827f8a.tar.gz rsyslog-17f36a76cbf15e088d2973ed5608f93e09827f8a.tar.xz rsyslog-17f36a76cbf15e088d2973ed5608f93e09827f8a.zip |
bugfix: imgssapi segfaulted under some conditions; this fix is actually not
just a fix but a change in the object model. Thanks to varmojfekoj for
providing the bug report, an initial fix and lots of good discussion
that lead to where we finally ended up.
Diffstat (limited to 'tcps_sess.c')
-rw-r--r-- | tcps_sess.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tcps_sess.c b/tcps_sess.c index 74de3c28..c8ac3a37 100644 --- a/tcps_sess.c +++ b/tcps_sess.c @@ -57,6 +57,10 @@ DEFobjStaticHelpers DEFobjCurrIf(errmsg) +/* forward definitions */ +static rsRetVal Close(tcps_sess_t *pThis); + + /* Standard-Constructor */ BEGINobjConstruct(tcps_sess) /* be sure to specify the object type also in END macro! */ @@ -86,6 +90,9 @@ finalize_it: /* destructor for the tcps_sess object */ BEGINobjDestruct(tcps_sess) /* be sure to specify the object type also in END and CODESTART macros! */ CODESTARTobjDestruct(tcps_sess) + if(pThis->sock != -1) + Close(pThis); + if(pThis->pSrv->pOnSessDestruct != NULL) { pThis->pSrv->pOnSessDestruct(&pThis->pUsr); } @@ -211,8 +218,8 @@ finalize_it: } -/* Closes a TCP session and marks its slot in the session - * table as unused. No attention is paid to the return code +/* Closes a TCP session + * No attention is paid to the return code * of close, so potential-double closes are not detected. */ static rsRetVal |