From nobody Mon Feb 9 01:19:29 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615654017; cv=none; d=zohomail.com; s=zohoarc; b=f7TltpP5h0FxR4MogUS6NVhMp4EdCXPyEdrHycah4HFAP4P4K3Ok7ROtl2sRMgGy5odslHaxMku7dpGhGr+6Kp2KEs6+8kbV9d6GpHjZlmGWavEv53d81xx4nSwyqo0nMkWUhVefdzusoRGOM5ppGTItFPau27IzhNZvJkVyOhg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615654017; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SWr56kRSOwx9E4WVmBZO8tKFvHyaIRM7iDN7QdVhN0M=; b=Pi53lShsvanxeZJbYkMoCQNyo+tzIALHg5GWQBVVMl7SmceFQyNoZ3VvGI/cv7O4KWHer3QOrx+GjQpbZqXKGnEf8+fQTtelCFXp8cA6PwYnwtM0LAen5rZ6SfLbEDJN15ZvIYwDmbgHVW3+zauDcrV2sY8X4ic1BSNjcFyrp+s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615654017282951.6039531604387; Sat, 13 Mar 2021 08:46:57 -0800 (PST) Received: from localhost ([::1]:40812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lL7Pk-0000hb-5Q for importer@patchew.org; Sat, 13 Mar 2021 11:46:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lL7HO-0002W2-VR; Sat, 13 Mar 2021 11:38:18 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:38791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lL7HL-0007Ki-BD; Sat, 13 Mar 2021 11:38:18 -0500 Received: by mail-wr1-x434.google.com with SMTP id z2so3446404wrl.5; Sat, 13 Mar 2021 08:38:09 -0800 (PST) Received: from localhost.localdomain ([197.61.164.30]) by smtp.googlemail.com with ESMTPSA id n6sm13173441wrt.1.2021.03.13.08.38.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Mar 2021 08:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SWr56kRSOwx9E4WVmBZO8tKFvHyaIRM7iDN7QdVhN0M=; b=jPfH694KCyCjIth3PR+wUrfs/TcMLA+8AIanuYJ/UoaBQbdMQsq0elAXtYE9oFjf+t hYNqE7FDQ1YAbO+3PXM/KUA1vfmpIp4NEu3CvPnBQMQhjqhY5K1R66+qXWuKzsFELoz9 L/a/xQRZHfb9NbqGJ2WroA7PtSSg2yUPJVGu7I4VCoEpZs9h60SCpg73PH3EWJJLiILV JTvdVj+yte3ATRLnze8ivy3+f8HDlPK48RKQpOgrgnq2+Pvk5SdGxN7pWrmu+M5A0zcN OASL4Yi+Mb8T7vp5vz/O+IInSGDCTkq+o786S7LGbrkfiaUhBmxrk/8YqdsSZTXR67Of Y4vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SWr56kRSOwx9E4WVmBZO8tKFvHyaIRM7iDN7QdVhN0M=; b=gB9dEvIkDFJoaCQ906q3YjM9K5F247xu5B0PEXs/tiFHrKUMqKRS4ZB9ApiWxPGpZq qrWmQlQomRr0iMUihuHOLRyKZcldNcUPUEOtuQKvLBTtLzyRaLdBdV1gpGmxaGawBgsP 1rD/rdopcfrEVdjOPyldE5AzIvveUEy3KrU/jMeFynvkhnOCR0lgyIXAjMK11gF3CqI+ AKc9HwRs0U69pbuEhHKvqCe0/XDKc4aj5UL3I4Ver7uczwr3udahhzorW3q0BlFbClF6 kpWEFah1Ev4LFh4EeXxmHy4ZIZJPQ/1A+XAKGKUup0U3GmQ1n0Xzd/EETIjBVsyRTs8s IZVg== X-Gm-Message-State: AOAM533l5ElXSQdKrDTSMZNaUHoEapR+FGaQhdkoN5HtXq8spu+xnCQR nbRuv2VjCU7TfDA5kGOlHDjura/CBhI= X-Google-Smtp-Source: ABdhPJxqhyViQNChPyViLihVE2NJZWTLFTqDZaFVMNd94ILueqa7sIVhyVYRZF8KkoimwB/X8RSidw== X-Received: by 2002:a05:6000:18a3:: with SMTP id b3mr19661574wri.373.1615653488562; Sat, 13 Mar 2021 08:38:08 -0800 (PST) From: Mahmoud Mandour To: qemu-devel@nongnu.org Subject: [PATCH 4/9] pc-bios/s390-ccw/netmain.c: Changed a malloc/free to GLib's variants Date: Sat, 13 Mar 2021 18:36:48 +0200 Message-Id: <20210313163653.37089-5-ma.mandourr@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210313163653.37089-1-ma.mandourr@gmail.com> References: <20210313163653.37089-1-ma.mandourr@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=ma.mandourr@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:S390-ccw boot" , Christian Borntraeger , Mahmoud Mandour , Cornelia Huck , Thomas Huth 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" Changed a call to malloc() and its respective calls free() with GLib's allocation and deallocation functions. Signed-off-by: Mahmoud Mandour --- pc-bios/s390-ccw/netmain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pc-bios/s390-ccw/netmain.c b/pc-bios/s390-ccw/netmain.c index 056e93a818..7f78150144 100644 --- a/pc-bios/s390-ccw/netmain.c +++ b/pc-bios/s390-ccw/netmain.c @@ -243,7 +243,7 @@ static const char *get_uuid(void) int i, cc, chk =3D 0; static char uuid_str[37]; =20 - mem =3D malloc(2 * PAGE_SIZE); + mem =3D g_try_malloc(2 * PAGE_SIZE); if (!mem) { puts("Out of memory ... can not get UUID."); return NULL; @@ -261,7 +261,7 @@ static const char *get_uuid(void) : "d" (r0), "d" (r1), [addr] "a" (buf) : "cc", "memory"); if (cc) { - free(mem); + g_free(mem); return NULL; } =20 @@ -269,7 +269,7 @@ static const char *get_uuid(void) uuid[i] =3D buf[STSI322_VMDB_UUID_OFFSET + i]; chk |=3D uuid[i]; } - free(mem); + g_free(mem); if (!chk) { return NULL; } --=20 2.25.1