From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anQji-0001cr-8p for qemu-devel@nongnu.org; Tue, 05 Apr 2016 09:09:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anQje-00042k-SQ for qemu-devel@nongnu.org; Tue, 05 Apr 2016 09:09:38 -0400 From: Md Haris Iqbal Date: Tue, 5 Apr 2016 18:39:03 +0530 Message-Id: <1459861743-4514-1-git-send-email-haris.phnx@gmail.com> Subject: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, pbonzini@redhat.com, Md Haris Iqbal , armbru@redhat.com, peter.maydell@linaro.org Signed-off-by: Md Haris Iqbal --- 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 03b502a..5fac42e 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -357,7 +357,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 @@ -383,7 +383,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 } -- 1.9.1