Author: cazfi
Date: Sat Jan 24 20:48:16 2015
New Revision: 27810

URL: http://svn.gna.org/viewcvs/freeciv?rev=27810&view=rev
Log:
Fixed a minor memory leak in /create command

See bug #23209

Modified:
    branches/S2_5/server/stdinhand.c

Modified: branches/S2_5/server/stdinhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/stdinhand.c?rev=27810&r1=27809&r2=27810&view=diff
==============================================================================
--- branches/S2_5/server/stdinhand.c    (original)
+++ branches/S2_5/server/stdinhand.c    Sat Jan 24 20:48:16 2015
@@ -836,6 +836,7 @@
   } else {
     cmd_reply(CMD_CREATE, caller, C_SYNTAX,
               _("Wrong number of arguments to create command."));
+    free_tokens(arg, ntokens);
     return FALSE;
   }
 
@@ -846,6 +847,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

Reply via email to