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

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

See bug #23209

Modified:
    branches/S2_6/server/stdinhand.c

Modified: branches/S2_6/server/stdinhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/stdinhand.c?rev=27809&r1=27808&r2=27809&view=diff
==============================================================================
--- branches/S2_6/server/stdinhand.c    (original)
+++ branches/S2_6/server/stdinhand.c    Sat Jan 24 20:48:10 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

Reply via email to