Author: cazfi
Date: Wed Aug 17 19:51:55 2016
New Revision: 33635

URL: http://svn.gna.org/viewcvs/freeciv?rev=33635&view=rev
Log:
Fixed double free of option of commandline parameter '-D'

See bug #24977

Modified:
    trunk/server/civserver.c

Modified: trunk/server/civserver.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/civserver.c?rev=33635&r1=33634&r2=33635&view=diff
==============================================================================
--- trunk/server/civserver.c    (original)
+++ trunk/server/civserver.c    Wed Aug 17 19:51:55 2016
@@ -275,7 +275,8 @@
       }
       free(option);
 #ifdef HAVE_FCDB
-    } else if ((option = get_option_malloc("--Database", argv, &inx, argc, 
TRUE))) {
+    } else if ((option = get_option_malloc("--Database", argv, &inx, argc, 
FALSE))) {
+      /* Freed after file has been loaded - not here nor in server quit */
       srvarg.fcdb_enabled = TRUE;
       srvarg.fcdb_conf = option;
     } else if (is_option("--auth", argv[inx])) {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to