This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, SMS] Free sccs field
- From: Revital Eres <revital dot eres at linaro dot org>
- To: zaks at il dot ibm dot com
- Cc: Patch Tracking <patches at linaro dot org>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 15 Apr 2011 18:27:05 +0300
- Subject: [PATCH, SMS] Free sccs field
Hello,
The attached patch adds missing free operation for storage
allocated while calculating SCCs.
Bootstrap and regtested on ppc64-redhat-linux.
OK for mainline?
Thanks,
Revital
Changelog:
* ddg.c (free_ddg_all_sccs): Free sccs field in struct ddg_all_sccs.
Index: ddg.c
===================================================================
--- ddg.c (revision 171573)
+++ ddg.c (working copy)
@@ -1011,6 +1082,8 @@ free_ddg_all_sccs (ddg_all_sccs_ptr all_
for (i = 0; i < all_sccs->num_sccs; i++)
free_scc (all_sccs->sccs[i]);
+ if (all_sccs->sccs)
+ free (all_sccs->sccs);
free (all_sccs);
}