Author: cazfi Date: Sat Jan 24 20:48:02 2015 New Revision: 27808 URL: http://svn.gna.org/viewcvs/freeciv?rev=27808&view=rev Log: Fixed a minor memory leak in /create command
See bug #23209 Modified: trunk/server/stdinhand.c Modified: trunk/server/stdinhand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/stdinhand.c?rev=27808&r1=27807&r2=27808&view=diff ============================================================================== --- trunk/server/stdinhand.c (original) +++ trunk/server/stdinhand.c Sat Jan 24 20:48:02 2015 @@ -735,6 +735,7 @@ } else { cmd_reply(CMD_CREATE, caller, C_SYNTAX, _("Wrong number of arguments to create command.")); + free_tokens(arg, ntokens); return FALSE; } @@ -745,6 +746,8 @@ status = create_command_pregame(arg[0], ai_type_name, check, NULL, buf, sizeof(buf)); } + + free_tokens(arg, ntokens); if (status != C_OK) { /* No player created. */ _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits