Author: cazfi
Date: Mon Jan 26 08:11:24 2015
New Revision: 27847

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

See patch #5740

Modified:
    trunk/common/research.c

Modified: trunk/common/research.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/research.c?rev=27847&r1=27846&r2=27847&view=diff
==============================================================================
--- trunk/common/research.c     (original)
+++ trunk/common/research.c     Mon Jan 26 08:11:24 2015
@@ -56,6 +56,10 @@
 #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;
 
 /****************************************************************************
@@ -95,6 +99,10 @@
 ****************************************************************************/
 void researches_free(void)
 {
+  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