From patchwork Fri Apr 15 15:27:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Revital Eres X-Patchwork-Id: 1038 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:48:32 -0000 Delivered-To: patches@linaro.org Received: by 10.224.67.148 with SMTP id r20cs57960qai; Fri, 15 Apr 2011 08:27:06 -0700 (PDT) Received: by 10.220.173.80 with SMTP id o16mr651864vcz.102.1302881226158; Fri, 15 Apr 2011 08:27:06 -0700 (PDT) Received: from mail-qw0-f50.google.com (mail-qw0-f50.google.com [209.85.216.50]) by mx.google.com with ESMTPS id c30si2368919vcm.1.2011.04.15.08.27.05 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Apr 2011 08:27:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.216.50 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) client-ip=209.85.216.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.50 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) smtp.mail=revital.eres@linaro.org Received: by qwe5 with SMTP id 5so2011376qwe.37 for ; Fri, 15 Apr 2011 08:27:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.187.197 with SMTP id cx5mr674752qab.349.1302881225632; Fri, 15 Apr 2011 08:27:05 -0700 (PDT) Received: by 10.224.28.136 with HTTP; Fri, 15 Apr 2011 08:27:05 -0700 (PDT) Date: Fri, 15 Apr 2011 18:27:05 +0300 Message-ID: Subject: [PATCH, SMS] Free sccs field From: Revital Eres To: zaks@il.ibm.com Cc: Patch Tracking , gcc-patches@gcc.gnu.org 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); }