From 3e9bb1c6b96ca82d5510ff7ff870929b239b387c Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 8 May 2013 06:38:52 -0700 Subject: [PATCH] fix leak: dispose struct before overwriting it --- xwords4/linux/linuxmain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xwords4/linux/linuxmain.c b/xwords4/linux/linuxmain.c index 624eedc7f..33fab2e22 100644 --- a/xwords4/linux/linuxmain.c +++ b/xwords4/linux/linuxmain.c @@ -2329,8 +2329,8 @@ main( int argc, char** argv ) } if ( mainParams.needsNewGame ) { - gi_initPlayerInfo( MPPARM(mainParams.mpool) - &mainParams.pgi, NULL ); + gi_disposePlayerInfo( MPPARM(mainParams.mpool) &mainParams.pgi ); + gi_initPlayerInfo( MPPARM(mainParams.mpool) &mainParams.pgi, NULL ); } /* curses doesn't have newgame dialog */