diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 3ec79f123f..adabeedfcd 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Sun May 25 11:24:02 EDT 2008 +Mon May 26 20:15:12 EDT 2008 diff --git a/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c b/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c index 57643ddc3e..8bb9a03f3c 100644 --- a/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c +++ b/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c @@ -185,13 +185,18 @@ int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events) int su_wait_destroy(su_wait_t *waitobj) { #if SU_HAVE_WINSOCK + su_wait_t w0 = NULL; assert(waitobj != NULL); - if (*waitobj) + if (*waitobj) { WSACloseEvent(*waitobj); + *waitobj = w0; + } #else su_wait_t w0 = { INVALID_SOCKET, 0, 0 }; assert(waitobj != NULL); - *waitobj = w0; + if (waitobj) { + *waitobj = w0; + } #endif return waitobj ? 0 : -1; }