From nobody Fri Dec 19 17:42:09 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569937248; cv=none; d=zoho.com; s=zohoarc; b=oXiJ1ZbWkrqdefcWY35vTYeIvbiTx39F41rnaZ7scmIl1/M6rx5qUZCaWyqFqLLpXcE7/Jquy++GJTGH7bY1CdBInEOTuNeE+i7p9r/JqBi7HdUEjutyxIQ7Qe5d42VI9Y0n1DCY0oalsTlipRg2X1qWiTqmtWPNcwx2l8WIO4k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569937248; h=Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=1pkb/xxA0Q1jhhvqUg4yWzv1bTQ2+Quoe621ugFPlfQ=; b=Q8Ws2pvUuui3KalRGrr7DM6rCyHj/bn2aWqVQawK95ifLyc0nTyO7Yy6URRRDGRZTzIhtFvTZUHxGlhQz/oQv+0OI+eLoXqYlgSDJbIjqLoGieawa51dj8dbewnkysi5m+igYZPUSaly9tNlouM26jZJ+9qUHdX11TVfqaqrUas= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1569937248298541.3477441338833; Tue, 1 Oct 2019 06:40:48 -0700 (PDT) Received: from localhost ([::1]:42260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFIOR-00024O-Pf for importer@patchew.org; Tue, 01 Oct 2019 09:40:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58049) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFIKR-00064x-9L for qemu-devel@nongnu.org; Tue, 01 Oct 2019 09:36:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFIKQ-0001dk-CI for qemu-devel@nongnu.org; Tue, 01 Oct 2019 09:36:35 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:40940) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFIKQ-0001d2-6D for qemu-devel@nongnu.org; Tue, 01 Oct 2019 09:36:34 -0400 Received: by mail-wr1-x444.google.com with SMTP id l3so15558208wru.7 for ; Tue, 01 Oct 2019 06:36:34 -0700 (PDT) Received: from 640k.localdomain ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id q192sm4424575wme.23.2019.10.01.06.36.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Oct 2019 06:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=1pkb/xxA0Q1jhhvqUg4yWzv1bTQ2+Quoe621ugFPlfQ=; b=SmJrF8SjcrcfJRtHSwE0H73LcQWxRbQdy3gsljzTtZRg5IeliTCSQ57dQLtJ1a8sID UGPY8Zcx+XzPSMSu05lqynPPEPruUJ86jlkQUhB9hAsqV7rgySJ7NV7s+bZyLoL6quME mLiW93ZGaqF1OBuz/NCOCGpFUROUvBfslZlv1vNwFzrGbJSmJcM27aqwn9eN9TX8horK w9mRUdsbL/tMT+rQEPyJeQZWDU3IXlvml+IFon1HRcMXEewfUG3oL1rYaYBNlUL/byPm +N7Mh6+cnf2Q1N4/nhs+vZ3w+NLvpi4jKUly1JLuJrcTkjjNPHmbArsBRQPfshZJUAoL 9jow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=1pkb/xxA0Q1jhhvqUg4yWzv1bTQ2+Quoe621ugFPlfQ=; b=pqK6K3O3zFhrFrQVJFlZbzT1qKIT1EyUXKHOp8xkWK3XAw2tBWO0aIkLQt0FPZYt72 TMvL6O3spQ7DAXFrtvbOGXc9GU02W/g3GnGrH0gV8Ceype0z6Tqx+2AGTLut4FFR3MK7 bGvjXaJsOkOLLGNGNskRB4mrdQYQbd0fNfGPEB9CwjuzEnJCHD92mJkNrw2fe4OT+s5q nokAJsv8lAB/yvjBWRXWMhl/abtG/nG3RTlC1Z+9RQNzIe2GdCUIKTUduCGOp1TpuBmr OYghRjZtYm9Gev/YThkqsOO0LZoVW4cDwQLE9nu52TwOUoAfB3nKB1LeBihwTYp5Pfw5 hMMw== X-Gm-Message-State: APjAAAXt69rdmGnRo8Z1sE0F9gHqBmHrNDh/MGwQrR4PWQ0HpQJ5OaqY nKOFl9uQ4E0M8tc9j7+u3uuLHX63 X-Google-Smtp-Source: APXvYqxmsbUj1UX0DV/N62uUEhdPZqJ9rU1FvXkwiS3SN165fxB727/d6jfDlDRBmCA42DOo+uUKog== X-Received: by 2002:adf:cf0e:: with SMTP id o14mr17627408wrj.277.1569936992349; Tue, 01 Oct 2019 06:36:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 2/8] microblaze: fix leak of fdevice tree blob Date: Tue, 1 Oct 2019 15:36:22 +0200 Message-Id: <1569936988-635-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1569936988-635-1-git-send-email-pbonzini@redhat.com> References: <1569936988-635-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The device tree blob returned by load_device_tree is malloced. Free it before returning. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/microblaze/boot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/microblaze/boot.c b/hw/microblaze/boot.c index bade4d2..d1d7dfb 100644 --- a/hw/microblaze/boot.c +++ b/hw/microblaze/boot.c @@ -100,6 +100,7 @@ static int microblaze_load_dtb(hwaddr addr, } =20 cpu_physical_memory_write(addr, fdt, fdt_size); + g_free(fdt); return fdt_size; } =20 --=20 1.8.3.1