qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free i


From: haris iqbal
Subject: Re: [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h
Date: Tue, 3 May 2016 15:15:50 +0530

Just a reminder. waiting for a review for the previous patch.

On Tue, Apr 5, 2016 at 6:39 PM, Md Haris Iqbal <address@hidden> wrote:
> Signed-off-by: Md Haris Iqbal <address@hidden>
> ---
>  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
>



-- 

With regards,

Md Haris Iqbal,
Placement Coordinator, MTech IT
NITK Surathkal,
Contact: +91 8861996962



reply via email to

[Prev in Thread] Current Thread [Next in Thread]