Author: cazfi
Date: Thu Aug  6 05:38:17 2015
New Revision: 29345

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

See patch #6169

Modified:
    branches/S2_6/server/sernet.c

Modified: branches/S2_6/server/sernet.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/sernet.c?rev=29345&r1=29344&r2=29345&view=diff
==============================================================================
--- branches/S2_6/server/sernet.c       (original)
+++ branches/S2_6/server/sernet.c       Thu Aug  6 05:38:17 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