Received: from eggs.gnu.org ([208.118.235.92]:40086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkzpU-0008AR-5w for qemu-devel@nongnu.org; Tue, 18 Dec 2012 11:15:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TkzpS-0002zl-Pi for qemu-devel@nongnu.org; Tue, 18 Dec 2012 11:15:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TkzpS-0002zO-Hn for qemu-devel@nongnu.org; Tue, 18 Dec 2012 11:15:38 -0500 Date: Tue, 18 Dec 2012 17:15:33 +0100 From: Igor Mammedov Message-ID: <20121218171533.48d5f8b6@nial.usersys.redhat.com> In-Reply-To: <20121218152829.GF5334@otherpad.lan.raisama.net> References: <1355760092-18755-1-git-send-email-imammedo@redhat.com> <1355760092-18755-8-git-send-email-imammedo@redhat.com> <20121218152829.GF5334@otherpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/20] target-i386: cpu_x86_register() consolidate freeing resources List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Don@CloudSwitch.com, qemu-devel@nongnu.org, afaerber@suse.de On Tue, 18 Dec 2012 13:28:29 -0200 Eduardo Habkost wrote: > On Mon, Dec 17, 2012 at 05:01:19PM +0100, Igor Mammedov wrote: > > freeing resources in one place would require setting 'error' > > to not NULL, so add some more error reporting before jumping to > > exit branch. > > > > Signed-off-by: Igor Mammedov > [...] > > +out: > > + g_strfreev(model_pieces); > > if (error) { > > fprintf(stderr, "%s\n", error_get_pretty(error)); > > error_free(error); > > - goto error; > > } > > - > > - g_strfreev(model_pieces); > > > You are making the function return 0 on errors. Is it on purpose? Nope, I'm sorry it seems I've lost return -1; in error branch on the way. > > > > return 0; > > -error: > > - g_strfreev(model_pieces); > > - return -1; > > } > > > > #if !defined(CONFIG_USER_ONLY) > > -- > > 1.7.1 > > > > >