From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39104) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abrys-0005zO-PN for qemu-devel@nongnu.org; Fri, 04 Mar 2016 10:49:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abryp-0007lM-4K for qemu-devel@nongnu.org; Fri, 04 Mar 2016 10:49:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abryo-0007lF-V7 for qemu-devel@nongnu.org; Fri, 04 Mar 2016 10:49:27 -0500 References: <1457103235-3341-1-git-send-email-sarahjmi07@gmail.com> <56D9AD78.8070802@redhat.com> From: Eric Blake Message-ID: <56D9AE85.7040604@redhat.com> Date: Fri, 4 Mar 2016 08:49:25 -0700 MIME-Version: 1.0 In-Reply-To: <56D9AD78.8070802@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6G9UOsHRwhQ2fJK81KbEqw8lgKpv2V1Q0" Subject: Re: [Qemu-devel] [PATCH][Outreachy] Signed-off-by: Sarah Khan List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sarah Khan , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6G9UOsHRwhQ2fJK81KbEqw8lgKpv2V1Q0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 b= itesized 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 =3D 0;i < 2; i++) { >> offset =3D 0; >> max_align =3D 1; >> - se->field_offsets[i] =3D malloc(nb_fields * sizeof(int)); >> + se->field_offsets[i] =3D g_malloc(nb_fields * sizeof(int)); >> type_ptr =3D se->field_types; >> for(j =3D 0;j < nb_fields; j++) { >> size =3D thunk_type_size(type_ptr, i); >=20 > Where is the corresponding free()? g_malloc() must be paired with > g_free(), so you need to convert both places at once. >=20 > 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --6G9UOsHRwhQ2fJK81KbEqw8lgKpv2V1Q0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW2a6FAAoJEKeha0olJ0NqpG8H/1rFveI6CVCl9W0LBNaFChUs xpfTwGT3dJtH2ONuzkOjaSX7jeZZAcn6Z5Y3UpcYDWw/6qWpPk/CsY2gNys6Jlvn cmLWbZHNKsRyQgP4zroDs64WbRoMUztBmFJFlzfbypLq0CbKi6QjegOdIEHfvZuI C58waVWIWHL7AIxvp4FuZfBjtlu+LKQgssz26fCuSt1Sa4C9l3yK7NzrPDuB4X+Y sxzbGNg5w6xTsxAUFgJ8CzkWYt6lnvwMzMmKJ+FIQjh/yFfbvrgNlGN+p79eAE0B oZPwO/aAjmLZFUi4ECUU62gpkag4S3fAQ0nDLO6Vl88dlMSg5n9wcMCt7aN2Oxg= =Blhs -----END PGP SIGNATURE----- --6G9UOsHRwhQ2fJK81KbEqw8lgKpv2V1Q0--