Author: cazfi
Date: Thu Aug  6 05:38:07 2015
New Revision: 29344

URL: http://svn.gna.org/viewcvs/freeciv?rev=29344&view=rev
Log:
Clear history from memory and free history file name on exit

See patch #6169

Modified:
    trunk/server/sernet.c

Modified: trunk/server/sernet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/sernet.c?rev=29344&r1=29343&r2=29344&view=diff
==============================================================================
--- trunk/server/sernet.c       (original)
+++ trunk/server/sernet.c       Thu Aug  6 05:38:07 2015
@@ -257,6 +257,9 @@
   if (history_file) {
     write_history(history_file);
     history_truncate_file(history_file, HISTORY_LENGTH);
+    free(history_file);
+    history_file = NULL;
+    clear_history();
   }
 #endif
 
@@ -506,7 +509,7 @@
 
         if (fc_dir != NULL) {
           fc_snprintf(fc_dir, fcdl, "%s/.freeciv", home_dir);
-          
+
           if (make_dir(fc_dir)) {
             history_file
               = fc_malloc(strlen(fc_dir) + 1 + strlen(HISTORY_FILENAME) + 1);


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

Reply via email to