qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan <address@h


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan <address@hidden>
Date: Fri, 4 Mar 2016 08:49:25 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 03/04/2016 08:44 AM, Eric Blake wrote:
> On 03/04/2016 07:53 AM, Sarah Khan wrote:
>> This patch replaces malloc() with g_malloc() as stated to be done in 
>> bitesized task
>>
>> diff --git a/thunk.c b/thunk.c
>> index f057d86..bddabae 100644
>> --- a/thunk.c
>> +++ b/thunk.c
>> @@ -88,7 +88,7 @@ void thunk_register_struct(int id, const char *name, const 
>> argtype *types)
>>      for(i = 0;i < 2; i++) {
>>          offset = 0;
>>          max_align = 1;
>> -        se->field_offsets[i] = malloc(nb_fields * sizeof(int));
>> +        se->field_offsets[i] = g_malloc(nb_fields * sizeof(int));
>>          type_ptr = se->field_types;
>>          for(j = 0;j < nb_fields; j++) {
>>              size = thunk_type_size(type_ptr, i);
> 
> Where is the corresponding free()?  g_malloc() must be paired with
> g_free(), so you need to convert both places at once.
> 
> Also, your patch is missing a Signed-off-by designation; without that,
> we can't accept it.

Oh, I see you DID include a S-o-b, but in the subject line of the patch
instead of the commit body.  Which still needs work.  You need a
one-line summary as the subject, not your S-o-b, so the commit message
should look more like:

thunk: Replace malloc with g_malloc()

This replacement was suggested as part of the bite-sized tasks.

Signed-off-by: Sarah Khan <address@hidden>


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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