Author: cazfi
Date: Mon Jan 26 08:12:01 2015
New Revision: 27850

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

See patch #5740

Modified:
    branches/S2_4/common/tech.c

Modified: branches/S2_4/common/tech.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_4/common/tech.c?rev=27850&r1=27849&r2=27850&view=diff
==============================================================================
--- branches/S2_4/common/tech.c (original)
+++ branches/S2_4/common/tech.c Mon Jan 26 08:12:01 2015
@@ -51,6 +51,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;
 
@@ -1146,5 +1150,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