Author: sveinung
Date: Sat May 13 23:23:47 2017
New Revision: 35561

URL: http://svn.gna.org/viewcvs/freeciv?rev=35561&view=rev
Log:
Auto help: free list of quoted action blockers.

This fixes a memory leak. Found with Valgrind.

See hrm Bug #659405

Modified:
    trunk/client/helpdata.c

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=35561&r1=35560&r2=35561&view=diff
==============================================================================
--- trunk/client/helpdata.c     (original)
+++ trunk/client/helpdata.c     Sat May 13 23:23:47 2017
@@ -2426,6 +2426,11 @@
                      astr_build_or_list(&blist, blockers, i));
 
         astr_free(&blist);
+
+        for (; i > 0; i--) {
+          /* The text was copied above. */
+          free((char *)(blockers[i - 1]));
+        }
       }
     }
   } action_iterate_end;


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

Reply via email to