qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-Devel] [PATCH] Changed malloc to g_malloc, free


From: haris iqbal
Subject: Re: [Qemu-trivial] [Qemu-Devel] [PATCH] Changed malloc to g_malloc, free to g_free in linux-user/qemu.h
Date: Wed, 30 Mar 2016 19:36:13 +0530

Hi,

Patch is attached in the previous mail. Looking forward to your review.

On Tue, Mar 29, 2016 at 9:23 PM, haris iqbal <address@hidden> wrote:
> Hi,
>
> Can I get a respond for this patch. Is it complete, or did I miss something?
>
>
> On Thu, Mar 24, 2016 at 12:02 AM, Md Haris Iqbal <address@hidden> wrote:
>> Signed-off-by: Md Haris Iqbal <address@hidden>
>> ---
>>  linux-user/qemu.h | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/linux-user/qemu.h b/linux-user/qemu.h
>> index 26b0ba2..3c3fd15 100644
>> --- a/linux-user/qemu.h
>> +++ b/linux-user/qemu.h
>> @@ -381,7 +381,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
>> @@ -407,7 +407,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



-- 

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]