From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC4fG-0005SL-2H for qemu-devel@nongnu.org; Sat, 08 Feb 2014 04:57:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WC4fA-0002jr-4Y for qemu-devel@nongnu.org; Sat, 08 Feb 2014 04:57:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WC4f9-0002jZ-Sy for qemu-devel@nongnu.org; Sat, 08 Feb 2014 04:57:28 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s189vQM7014660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 8 Feb 2014 04:57:26 -0500 Message-ID: <52F5FF84.5010106@redhat.com> Date: Sat, 08 Feb 2014 10:57:24 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <1391849670-10352-1-git-send-email-kwolf@redhat.com> <52F5FCF8.2070107@redhat.com> <20140208095537.GD2954@dhcp-200-207.str.redhat.com> In-Reply-To: <20140208095537.GD2954@dhcp-200-207.str.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] blkdebug: Don't leak bs->file on failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, stefanha@redhat.com On 02/08/14 10:55, Kevin Wolf wrote: > Am 08.02.2014 um 10:46 hat Laszlo Ersek geschrieben: >> How about the attached patch instead? Releasing stuff in specific error >> handler blocks quickly becomes intractable if there are many resources >> to allocate in succession, but in this case I think we can easily get >> away with it. > > I'd prefer to avoid this because it's too easy to miss it when you add > new code to the function. Oh, right. If you actually care about the future, this is a good point :) Thanks! Laszlo