mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
plug memory leak by closing relay socket when quitting
This commit is contained in:
parent
ae7caae236
commit
a9ca60729d
3 changed files with 5 additions and 1 deletions
|
@ -565,6 +565,9 @@ quit( void* XP_UNUSED(dunno), GtkAppGlobals* globals )
|
||||||
#ifdef XWFEATURE_IP_DIRECT
|
#ifdef XWFEATURE_IP_DIRECT
|
||||||
linux_udp_close( &globals->cGlobals );
|
linux_udp_close( &globals->cGlobals );
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef XWFEATURE_RELAY
|
||||||
|
linux_close_socket( &globals->cGlobals );
|
||||||
|
#endif
|
||||||
|
|
||||||
vtmgr_destroy( MEMPOOL globals->cGlobals.params->vtMgr );
|
vtmgr_destroy( MEMPOOL globals->cGlobals.params->vtMgr );
|
||||||
|
|
||||||
|
|
|
@ -474,7 +474,7 @@ linux_send( const XP_U8* buf, XP_U16 buflen,
|
||||||
} /* linux_send */
|
} /* linux_send */
|
||||||
|
|
||||||
#ifdef XWFEATURE_RELAY
|
#ifdef XWFEATURE_RELAY
|
||||||
static void
|
void
|
||||||
linux_close_socket( CommonGlobals* cGlobals )
|
linux_close_socket( CommonGlobals* cGlobals )
|
||||||
{
|
{
|
||||||
int socket = cGlobals->socket;
|
int socket = cGlobals->socket;
|
||||||
|
|
|
@ -63,6 +63,7 @@ XWStreamCtxt* streamFromFile( CommonGlobals* cGlobals, char* name,
|
||||||
void* closure );
|
void* closure );
|
||||||
void writeToFile( XWStreamCtxt* stream, void* closure );
|
void writeToFile( XWStreamCtxt* stream, void* closure );
|
||||||
|
|
||||||
|
void linux_close_socket( CommonGlobals* cGlobals );
|
||||||
|
|
||||||
#ifdef KEYBOARD_NAV
|
#ifdef KEYBOARD_NAV
|
||||||
XP_Bool linShiftFocus( CommonGlobals* cGlobals, XP_Key key,
|
XP_Bool linShiftFocus( CommonGlobals* cGlobals, XP_Key key,
|
||||||
|
|
Loading…
Reference in a new issue