[mw-devel] [Git][arthur/mw][master] Avoid freeing invalid pointers in gaglist_destroy()

Andrew Price welshbyte at sucs.org
Thu Aug 17 00:57:13 BST 2017


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
805b62bb by Andrew Price at 2017-08-17T00:55:37+01:00
Avoid freeing invalid pointers in gaglist_destroy()

- - - - -


1 changed file:

- src/client/gaglist.c


Changes:

=====================================
src/client/gaglist.c
=====================================
--- a/src/client/gaglist.c
+++ b/src/client/gaglist.c
@@ -27,6 +27,7 @@ void gaglist_destroy(void)
 {
 	for (size_t i = 0; i < gaglist_len; i++)
 		free(gaglist[i]);
+	gaglist_len = 0;
 	free(gaglist);
 	gaglist = NULL;
 }



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/805b62bb27210b5e3b41a7f2813010a757369986

---
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/805b62bb27210b5e3b41a7f2813010a757369986
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20170817/4e4f2c0e/attachment.html>


More information about the mw-devel mailing list