Author: cazfi
Date: Mon Jan 26 08:11:54 2015
New Revision: 27849

URL: http://svn.gna.org/viewcvs/freeciv?rev=27849&view=rev
Log:
Free individual strings from Future tech names vector on server exit.

See patch #5740

Modified:
    branches/S2_5/common/tech.c

Modified: branches/S2_5/common/tech.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/tech.c?rev=27849&r1=27848&r2=27849&view=diff
==============================================================================
--- branches/S2_5/common/tech.c (original)
+++ branches/S2_5/common/tech.c Mon Jan 26 08:11:54 2015
@@ -53,6 +53,10 @@
 #define SPECVEC_TAG string
 #define SPECVEC_TYPE char *
 #include "specvec.h"
+
+#define string_vector_iterate(str_vec, str) \
+  TYPED_VECTOR_ITERATE(char *, str_vec, str)
+#define string_vector_iterate_end VECTOR_ITERATE_END
 
 static struct string_vector future;
 
@@ -1236,5 +1240,9 @@
     tech_free(i);
   } advance_index_iterate_end;
 
+  string_vector_iterate(&future, str) {
+    free(str);
+  } string_vector_iterate_end;
+
   string_vector_free(&future);
 }


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

Reply via email to