From patchwork Tue Oct 5 10:11:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Morin X-Patchwork-Id: 66802 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 49EC3B70CC for ; Tue, 5 Oct 2010 21:15:44 +1100 (EST) Received: (qmail 1435 invoked by alias); 5 Oct 2010 10:14:36 -0000 Received: (qmail 1400 invoked by uid 22791); 5 Oct 2010 10:14:35 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_NEUTRAL, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp22.services.sfr.fr (HELO smtp22.services.sfr.fr) (93.17.128.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Oct 2010 10:14:26 +0000 Received: from smtp22.services.sfr.fr (msfrf2208 [10.18.26.22]) by msfrf2215.sfr.fr (SMTP Server) with ESMTP id 714447000485; Tue, 5 Oct 2010 12:14:23 +0200 (CEST) Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2208.sfr.fr (SMTP Server) with ESMTP id 22EF07000323; Tue, 5 Oct 2010 12:11:12 +0200 (CEST) Received: from gimli.local (99.123.193-77.rev.gaoland.net [77.193.123.99]) by msfrf2208.sfr.fr (SMTP Server) with ESMTP id E6EED7000329; Tue, 5 Oct 2010 12:11:11 +0200 (CEST) X-SFR-UUID: 20101005101111945.E6EED7000329@msfrf2208.sfr.fr MIME-Version: 1.0 From: Mikael Morin To: gfortran , patches Message-ID: <20101005100948.1836.16710@gimli.local> In-Reply-To: <20101005100947.1836.44153@gimli.local> References: <20101005100947.1836.44153@gimli.local> Subject: [Patch, fortran] [12/22] Various minor fixups Date: Tue, 5 Oct 2010 12:11:11 +0200 (CEST) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 2010-10-04 Mikael Morin * symbol.c (free_entry_list): New function. (gfc_free_namespace): Free list of entries. diff --git a/symbol.c b/symbol.c index cd07b63..1f41031 100644 --- a/symbol.c +++ b/symbol.c @@ -3252,6 +3252,22 @@ void gfc_free_charlen (gfc_charlen *cl, gfc_charlen *end) } +/* Free entry list structs. */ + +static void +free_entry_list (gfc_entry_list *el) +{ + gfc_entry_list *next; + + if (el == NULL) + return; + + next = el->next; + gfc_free (el); + free_entry_list (next); +} + + /* Free a namespace structure and everything below it. Interface lists associated with intrinsic operators are not freed. These are taken care of when a specific name is freed. */ @@ -3281,6 +3297,7 @@ gfc_free_namespace (gfc_namespace *ns) gfc_free_charlen (ns->cl_list, NULL); free_st_labels (ns->st_labels); + free_entry_list (ns->entries); gfc_free_equiv (ns->equiv); gfc_free_equiv_lists (ns->equiv_lists); gfc_free_use_stmts (ns->use_stmts);