From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abruY-0003Su-5y for qemu-devel@nongnu.org; Fri, 04 Mar 2016 10:45:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abruT-0006LQ-QK for qemu-devel@nongnu.org; Fri, 04 Mar 2016 10:45:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abruT-0006KW-Kr for qemu-devel@nongnu.org; Fri, 04 Mar 2016 10:44:57 -0500 References: <1457103235-3341-1-git-send-email-sarahjmi07@gmail.com> From: Eric Blake Message-ID: <56D9AD78.8070802@redhat.com> Date: Fri, 4 Mar 2016 08:44:56 -0700 MIME-Version: 1.0 In-Reply-To: <1457103235-3341-1-git-send-email-sarahjmi07@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lNWvwvi1vQRMKxSXCDwdXCTOfnQ0R3FIP" 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) --lNWvwvi1vQRMKxSXCDwdXCTOfnQ0R3FIP Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/04/2016 07:53 AM, Sarah Khan wrote: > This patch replaces malloc() with g_malloc() as stated to be done in bi= tesized task >=20 > 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); 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. More hints at: http://wiki.qemu.org/Contribute/SubmitAPatch https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Docu= mentation/SubmittingPatches?id=3Df6f94e2ab1#n297 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --lNWvwvi1vQRMKxSXCDwdXCTOfnQ0R3FIP 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/ iQEcBAEBCAAGBQJW2a14AAoJEKeha0olJ0NqniQH/2tCKISvQKZby7dVp8oOHoqo 9AgCs82yl0EqVRSVt2SYmwZSC2W7FpyVnu6zcdeBUa1BlBY/gE5L0OIP+86Ug5ls ULqmvdpdh3gB7DleTLeP1oYCiC6rD86w4FwHp1lKE+w1/LK4hZvPE6ibAU0uITva qMaJVBXB7HDTF/52CUhewrD+C0KGYf68kdE6ee+lwfiAVUwIPQ4R3WMAFtPt4fhM XMAnw0flK6qtWYuc0nm1EH+AMgMW/T3wybeL2NHdSN9Vnnz1myd5p1/iYlASiU4h U2HIvuASS1csWij+WNP1q4pWrUC16WSGBoCtekjIlTg6AnNWdTnfdLP1xim2lzg= =sesb -----END PGP SIGNATURE----- --lNWvwvi1vQRMKxSXCDwdXCTOfnQ0R3FIP--