From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id 3B6ED7F96 for ; Tue, 5 Aug 2014 08:31:57 -0500 (CDT) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by relay3.corp.sgi.com (Postfix) with ESMTP id BC2B0AC006 for ; Tue, 5 Aug 2014 06:31:56 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by cuda.sgi.com with ESMTP id bW473NbznPlNCkq8 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 05 Aug 2014 06:31:55 -0700 (PDT) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s75DVsDT000683 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 5 Aug 2014 09:31:55 -0400 Date: Tue, 5 Aug 2014 09:31:53 -0400 From: Brian Foster Subject: Re: [PATCH 6/6] xfs_db: free flist on error in write_struct() Message-ID: <20140805133153.GG53538@bfoster.bfoster> References: <1406905159-12415-1-git-send-email-sandeen@redhat.com> <1406905159-12415-7-git-send-email-sandeen@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1406905159-12415-7-git-send-email-sandeen@redhat.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Eric Sandeen Cc: xfs@oss.sgi.com On Fri, Aug 01, 2014 at 09:59:19AM -0500, Eric Sandeen wrote: > One error path in write_struct() wasn't freeing > the flist_t *fl which was allocated, so it leaks. > > Signed-off-by: Eric Sandeen > --- Reviewed-by: Brian Foster > db/write.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/db/write.c b/db/write.c > index 0157a44..a0f14f4 100644 > --- a/db/write.c > +++ b/db/write.c > @@ -652,6 +652,7 @@ write_struct( > buf = convert_arg(argv[1], bit_length); > if (!buf) { > dbprintf(_("unable to convert value '%s'.\n"), argv[1]); > + flist_free(fl); > return; > } > > -- > 1.7.1 > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs