From nobody Sun Nov 9 14:47:46 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551361469558459.1610768701597; Thu, 28 Feb 2019 05:44:29 -0800 (PST) Received: from localhost ([127.0.0.1]:38679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzLyy-0004l9-DK for importer@patchew.org; Thu, 28 Feb 2019 08:44:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzLxs-0004I2-3Z for qemu-devel@nongnu.org; Thu, 28 Feb 2019 08:43:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzLxq-0005d6-TV for qemu-devel@nongnu.org; Thu, 28 Feb 2019 08:43:08 -0500 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:38650) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzLxq-0005Yw-JP; Thu, 28 Feb 2019 08:43:06 -0500 Received: by mail-pl1-x642.google.com with SMTP id g37so6975407plb.5; Thu, 28 Feb 2019 05:42:54 -0800 (PST) Received: from am-swift ([136.233.9.103]) by smtp.gmail.com with ESMTPSA id p11sm54876891pfi.10.2019.02.28.05.42.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 05:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:mime-version :content-transfer-encoding; bh=caZCtLOJxLHuXbGNoCrKqy+4QSaxAz1Cagv4eT6F4I8=; b=VEtSZK4fSiYBp6RcgP0HV5Rf8mPeN9XpYwRqE7ccAYFUM6g0yryOEoWZaGMRFnLaYq HMli44ZGtqIYS54o4U/Ge1Gey+5BoirwVSS0bhVcQpWU4jD3jSijKD19K9ru52AEs9VR q6oArMSr4cpf90s7+t1+Vp6p867M8aVPCAx2Dyb99EcMOMk9uzTqwo+G/2RqGfVhqT5J xXivLdl2MRB2maQrRBCxTcy+dpBKuAl5OozFYD3pn3M5XxLmLRSzieaJaTP/CbgNyoHb 3cclBx5M59xGXuWQ/+DNE4R81rO0Uiw3fQPXofspbNVIjr/qlsyGV8PM+PHKSDv5xKAF 2Jpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:mime-version :content-transfer-encoding; bh=caZCtLOJxLHuXbGNoCrKqy+4QSaxAz1Cagv4eT6F4I8=; b=Eau2Hmy3yQgapZfo6l1gyc7W30FUOF7yRF/xoAudRuCWVIN2MSbf2Jsu9jbwfccXmO jrXcs0pBOduMhfp5J1ZJPbU52mUUVxHU2IsI5sPM1WegXzwgJ5NccZhL26Y0axtfBh3g DI0/HwjqP1M011kOOS2mTGFsZx0+Dz62KJgyVgrZrebmYY/tXfjyfFJXscr8fOK2AIyJ 0KVeBx0ZLvzFAGneZvksSeitEl2CudJ/AFLzKj0u41Bre81aOoSgrwEyHc67lvzTPftb 50O9Pe+SfcpOjssERtqQypqWlSK8hMbSetg0PStY/XDRj2x14fvA7WBOGSDGJ+VEZQJE F6+Q== X-Gm-Message-State: AHQUAubRqftLBPyKhk/WJ1my6KfQsLQNWs5S/nc/CLNywV8F4uXjRAVA Q/jbqshpKkiuu081gj39Wk/kVdeW86Q= X-Google-Smtp-Source: AHgI3Ia1qCBr9XdeheH7xlggOhRYryigzZSqoORP7rpbTZbSvMlPu8cWZIUKMiedtPYYHlzg65wpBQ== X-Received: by 2002:a17:902:8d89:: with SMTP id v9mr7203957plo.254.1551361372436; Thu, 28 Feb 2019 05:42:52 -0800 (PST) Message-ID: <4817f5c3b20aedba869608c06e76d11a722f4864.camel@gmail.com> From: Aarushi Mehta To: qemu-devel@nongnu.org Date: Thu, 28 Feb 2019 19:12:45 +0530 X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 Subject: [Qemu-devel] [PATCH] trivial malloc to g_malloc in thunk X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Stefan Hajnoczi , Julia Suvorova Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Hi This is a trivial contribution part of the BiteSizedTasks on the wiki. I found this discussion http://git.corpit.ru/?p=3Dqemu.git;a=3Dcommit;h=3Db= 45c03f585ea9bb1af76c73e82195418c294919d on migrating even g_malloc to g_new, is this not appropriate for the same?=20 The wiki can presumably use an update regarding this. Signed-off-by: Aarushi --- thunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thunk.c b/thunk.c index d5d8645cd4..03fb2abab7 100644 --- a/thunk.c +++ b/thunk.c @@ -89,7 +89,7 @@ void thunk_register_struct(int id, const char *name, cons= t 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 2.17.1