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

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

See bug #23209

Modified:
    branches/S2_4/server/stdinhand.c

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