From patchwork Tue Jul 19 08:34:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 9236405 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4615360574 for ; Tue, 19 Jul 2016 08:45:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 356FD200F5 for ; Tue, 19 Jul 2016 08:45:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29B1C206AF; Tue, 19 Jul 2016 08:45:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C2A1E200F5 for ; Tue, 19 Jul 2016 08:45:48 +0000 (UTC) Received: from localhost ([::1]:53851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQey-0006DM-13 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 19 Jul 2016 04:45:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQTy-0005yU-G6 for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:34:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPQTw-0003Jx-Gd for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:34:25 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQTw-0003Js-A5 for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:34:24 -0400 Received: by mail-wm0-x244.google.com with SMTP id x83so2003973wma.3 for ; Tue, 19 Jul 2016 01:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=M9YuNQkdot7lEANj8mwrMAwTY7xd01yqfG/VtVe/pC8=; b=ODlunWWlVT0p+PtQTq85qLnDBlwJnPtZA1pAje19/ILtVsPkGiljvZnJALFEFAy89f g9G405Q//frv1E5XNWbmkGcX1wI4I5iMt/cV+vsXgi8cFiR8YdVbTBNKkYgEM9elQ62G V3Zz7I4UD2B/pgvBOxrHwZNJMfL2uUxQV9ZU50G59haelRBXbARJ6v9WsXoiF4vI7A+2 yP8oMC8KpbTo/9ffbMJD04yi5MH20fH/vH4R8cAOXyYg65TN+BqGA2zqHFUfoxOQUz3+ daA6XwqC5PhlIvO/7ags3eCMZpSKScHPWDhFqifR8TFZJx/nEZ9ZCcdyyPfjpWpgfu5c tFEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=M9YuNQkdot7lEANj8mwrMAwTY7xd01yqfG/VtVe/pC8=; b=RU08YYh2NIg311bgXVIq2FyOkbaFqlqfpnA1Cv1fyk2OS2cMuetCvhKyPAXZYY93RB YnkUsMrAcrym/STxTuke/r0hXCPfS3WXePaJmryaXKQZ14ohgTGF4E5uFAB719hogs5u Eazd44DoXxdDlkHf/smB9WEuBOqXKuY/Ua8ttkpCVPJ3TWgd9gG4nC8foZGLjJqigwJc ywBPVj1MldnKtVn9Y7oW5w5PtAq1TMvlSNtm1SnOznBFS194cfYyfoN9opBqn5lTEJ9W 66n0GQNUFDMOkr0kLU11HtBjtuqEXi3KGvEmnmLxJ9ulr2Lu5C2a0r9r9u53lgg7TkZj r1MA== X-Gm-Message-State: ALyK8tJ7y4FHOgchOCdzqct6TYZJVMJU9qREPgEy1op+AEEt0q7XsKHKx8Jfd5BFOp/KKQ== X-Received: by 10.28.111.213 with SMTP id c82mr2343862wmi.47.1468917263757; Tue, 19 Jul 2016 01:34:23 -0700 (PDT) Received: from donizetti.lan (94-39-158-5.adsl-ull.clienti.tiscali.it. [94.39.158.5]) by smtp.gmail.com with ESMTPSA id o142sm20886055wme.20.2016.07.19.01.34.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2016 01:34:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 19 Jul 2016 10:34:09 +0200 Message-Id: <1468917259-8475-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468917259-8475-1-git-send-email-pbonzini@redhat.com> References: <1468917259-8475-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PULL 02/12] Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Md Haris Iqbal Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Md Haris Iqbal Signed-off-by: Md Haris Iqbal Message-Id: <1459861743-4514-1-git-send-email-haris.phnx@gmail.com> Reviewed-by: Sean Bruno Signed-off-by: Paolo Bonzini --- bsd-user/qemu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 53163b8..6ccc544 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -358,7 +358,7 @@ static inline void *lock_user(int type, abi_ulong guest_addr, long len, int copy #ifdef DEBUG_REMAP { void *addr; - addr = malloc(len); + addr = g_malloc(len); if (copy) memcpy(addr, g2h(guest_addr), len); else @@ -384,7 +384,7 @@ static inline void unlock_user(void *host_ptr, abi_ulong guest_addr, return; if (len > 0) memcpy(g2h(guest_addr), host_ptr, len); - free(host_ptr); + g_free(host_ptr); #endif }