plug memory leak by closing relay socket when quitting

This commit is contained in:
ehouse 2009-02-28 19:19:42 +00:00
parent ae7caae236
commit a9ca60729d
3 changed files with 5 additions and 1 deletions

View file

@ -565,6 +565,9 @@ quit( void* XP_UNUSED(dunno), GtkAppGlobals* globals )
#ifdef XWFEATURE_IP_DIRECT
linux_udp_close( &globals->cGlobals );
#endif
#ifdef XWFEATURE_RELAY
linux_close_socket( &globals->cGlobals );
#endif
vtmgr_destroy( MEMPOOL globals->cGlobals.params->vtMgr );

View file

@ -474,7 +474,7 @@ linux_send( const XP_U8* buf, XP_U16 buflen,
} /* linux_send */
#ifdef XWFEATURE_RELAY
static void
void
linux_close_socket( CommonGlobals* cGlobals )
{
int socket = cGlobals->socket;

View file

@ -63,6 +63,7 @@ XWStreamCtxt* streamFromFile( CommonGlobals* cGlobals, char* name,
void* closure );
void writeToFile( XWStreamCtxt* stream, void* closure );
void linux_close_socket( CommonGlobals* cGlobals );
#ifdef KEYBOARD_NAV
XP_Bool linShiftFocus( CommonGlobals* cGlobals, XP_Key key,