mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
plug leak: don't alloc stream when it won't be used
This commit is contained in:
parent
71c1fc527a
commit
1ec03e48bb
1 changed files with 4 additions and 3 deletions
|
@ -1391,7 +1391,6 @@ server_sendInitialMessage( ServerCtxt* server )
|
|||
static void
|
||||
freeBWI( MPFORMAL BadWordInfo* bwi )
|
||||
{
|
||||
/* BadWordInfo* bwi = &server->illegalWordInfo; */
|
||||
XP_U16 nWords = bwi->nWords;
|
||||
|
||||
while ( nWords-- ) {
|
||||
|
@ -1871,7 +1870,7 @@ storeBadWords( const XP_UCHAR* word, XP_Bool isLegal,
|
|||
if ( !isLegal ) {
|
||||
ServerCtxt* server = (ServerCtxt*)closure;
|
||||
|
||||
XP_STATUSF( "storeBadWords called with \"%s\"", word );
|
||||
XP_LOGF( "storeBadWords called with \"%s\"", word );
|
||||
|
||||
server->illegalWordInfo.words[server->illegalWordInfo.nWords++]
|
||||
= copyString( server->mpool, word );
|
||||
|
@ -2102,7 +2101,9 @@ reflectMoveAndInform( ServerCtxt* server, XWStreamCtxt* stream )
|
|||
(TrayTileSet*)NULL, sourceClientIndex );
|
||||
|
||||
server->vol.showPrevMove = XP_TRUE;
|
||||
mvStream = makeMoveReportIf( server, &wordsStream );
|
||||
if ( isLegalMove ) {
|
||||
mvStream = makeMoveReportIf( server, &wordsStream );
|
||||
}
|
||||
|
||||
success = model_commitTurn( model, whoMoved, &newTiles );
|
||||
resetEngines( server );
|
||||
|
|
Loading…
Add table
Reference in a new issue