Message ID | 20211110150234.1229950-1-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBEN6V6GAMGQE5GIIMWI@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=VtKe5qVV; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::339; helo=mail-wm1-x339.google.com; envelope-from=swupdate+bncbcxploxj6ikrben6v6gamgqe5giimwi@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-wm1-x339.google.com (mail-wm1-x339.google.com [IPv6:2a00:1450:4864:20::339]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hq7Pg1pGMz9s0r for <incoming@patchwork.ozlabs.org>; Thu, 11 Nov 2021 02:02:47 +1100 (AEDT) Received: by mail-wm1-x339.google.com with SMTP id 144-20020a1c0496000000b003305ac0e03asf3213874wme.8 for <incoming@patchwork.ozlabs.org>; Wed, 10 Nov 2021 07:02:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636556562; cv=pass; d=google.com; s=arc-20160816; b=dAjIVDUz5GsbQGM4kXjTwY6SkI8YmnBcLq0LsO7rGkzBBz2hzUqK5otsjyLuN2BvBf gJMvwisxrCSw7537br0Uxu7LjlUen6JVw5Mm9LIqJdDTZ5CuU5qJtpDIEMIMm9R8zd1o 12CbBxJ+nNkRvMJ+fb+75LSGiEtQ7DwBZ7LX8p4teIBd1+h1riJf7nZpAjJ+ySFus2Mz 7VSegDQJ1bx3BNoYs5eheumVQdYcB56Fywdky1GN3RE2RqBBSPlW9nSr5sP1ZZDJpZX9 JJPHwY12i2mPtFR05Bifg6fI41BPHxtJnsraCHr0EWDaI8uVWbTGjErh7FIPCu63HZoU O+FA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=E8tScB7fkVH5ZhpGKTg54zs1GydtKGy8fQLK2uF5cmM=; b=fGr49HQfkM82sd8GTxk3fXVAd2bt0eGadFF9aEwFC3Q4cmy4lHBf4eDfRygfh96ApY VGFuNFrt8kZ/bbleFCfDn+aBYH0MPAU8p9e+14tmwaK6585Ah6KwES90dMH92usSTmaW I4aE3b6t+baGmD0rhJReYPMQcWkFJTNzyhJx3Lq+eTHVfwr2g9PIrPY7iWRkDjtM8IBQ xhGqgR+K8nunfaH61xRt1k9ReOfWZLXWVVlhTB11/NWYLFNyUvXCeGeyx9RCirliZavH DAhd0H7YNDvIAOaFcfZTXOF7iMOSvS0tIfXrXP3CeyVdPkGeY9yIVoFKdfufizGDj2zw 28EA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=E8tScB7fkVH5ZhpGKTg54zs1GydtKGy8fQLK2uF5cmM=; b=VtKe5qVVOs5MCPEWnXo7cX8adQzVMbZEKoYmnsZ86QMfv1+MTN0R5wPdr2eYccyn4r UMRxGajhFLaaLEcx+X2MiNtlzRYcmowgT3lLnt/Ig7CkeHeSIBp3IAh6ep9fyjI2R0A6 BC42HM+8BVCUvtbhiYt+QyiOK7zEDfvOXlGy3x92IPVzjetYL1v0hNHsgJEX2HCfLLq+ 8XTkPcSygcXQrzWTzLYwVx9RD02XZDQSBUprR5rgXaKTg601cg1jDRRZRfSi4r0T50+S 77LNc3rtIYDBprd/uxcuZ9cvB3kcvNsMi+c3f9hkB2J6koI++vgjoMQgMo0ha2J3GGNv OjXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=E8tScB7fkVH5ZhpGKTg54zs1GydtKGy8fQLK2uF5cmM=; b=ryBjPTQznnO5rHkiq7/UHgY2gYhF5iIPzbknQGiBZP4XbBSu/Fhr0KlyeFY18AikVb YMWW47Uyr7vzLrFqhYQ7fzHED79NCB9CLsasVk7W/K7LLFoWgz1L+iumZH/3J4QqHfPY I0F4J7vQhvnUHhl2AvuaiBtVYmHXXC9kAWMp/6Rp+2t7IaK2vD4tqjB5pt9kv3UHtzhg wGgQBZyc255BD937VdetF6bj0/FqmxmoYkFOp50oWD4wkOpeA+WiVaYueL7/Og/psUFl tJIvG2Wti6jaRXSj14pENColwLx0UymCZpu62IRcp7v32Nk6FUKQPLDSRrGquv6eDFcq xECw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM531kWO2jgXrYfy6CbvvYWCvXmLZgm6sjxhOzi9bLblx5TawUPqd0 aJoT+kfJHRizaua8k5md4kk= X-Google-Smtp-Source: ABdhPJzpfXJiHn3HqTJp53OBm5Vm13pfeY7MiTgk35du08mSu9TMM8SzjtGYz3ni+AhhuNsZR+N+gw== X-Received: by 2002:a5d:4704:: with SMTP id y4mr418533wrq.85.1636556562230; Wed, 10 Nov 2021 07:02:42 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a5d:6b08:: with SMTP id v8ls185444wrw.3.gmail; Wed, 10 Nov 2021 07:02:41 -0800 (PST) X-Received: by 2002:a5d:4143:: with SMTP id c3mr488252wrq.254.1636556561257; Wed, 10 Nov 2021 07:02:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636556561; cv=none; d=google.com; s=arc-20160816; b=GunUY5bmyXNlmsPR+aX+An7vZR4jwBiXb+HdwKkiNZQSt7iYctb6+57uFhiulkIbIF dDoW61ptglAxsHAKBLXssOvJ3Boj32K9vRQCZGLWMNT3L5jOxGezOpyFIw0TP/FkqC2B V0sanx5GwoP0K/1rVGaEBPiWM24lQx6G9azHLWps+yLzV661ia0Yv4d6d9CbOb8/t7Af yYPWZLkfXi/z24Em9pKQBM9NcNxbwBUnKO+UGZN2JW9d6SnkusqYKLjghAvYCfRHlKR7 3S0Ot1mmTjA5gDMi4T7h0NhVNwi1RdO+NqrFDgNX8F3MD47iRHN20f1NmCzKXXU6n4P+ ypfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=R8fIJqocWAYNbcCvNleAgiy0HxULHYJ5aCaubETExko=; b=qJNnpwJwe3dLqUlhJNt/V1/r6rSH1D1zxeCd2j+JOwJTj/1/fPg8lBW6SMoFGqLkwH gI6yitfp8oyszCOBqq/T1l8hxLDAMxM9YIw4NW37b4Dz+e+yCO+dc136ANBDCDxD7/Zf 8ogQMbToXevy920t0SOLUDFlzfofybg5WqEP5dSTzpbKU89eklK/PC/4Jk73iOuFs0A1 UonXIVg6RZevL2NaMWP+fTv1tq05jvaVI9ioF89hHgsB3gtc7tdAsPwtjYGO1GhKzNip 12awWt77x/H/ixKMTvpyDmDxh9+Kf9uiK/S330a0gtvAG3VSsKxAFPN/6+dDDsYyvOFz QNTw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id s138si552461wme.1.2021.11.10.07.02.41 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Nov 2021 07:02:41 -0800 (PST) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Hq7PY0XQHz1sNdB; Wed, 10 Nov 2021 16:02:41 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Hq7PX6tm4z1qqkC; Wed, 10 Nov 2021 16:02:40 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id YXSMGQOHBB5G; Wed, 10 Nov 2021 16:02:39 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Wed, 10 Nov 2021 16:02:39 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 104CD4540D47; Wed, 10 Nov 2021 16:02:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oqeClgAL2DCs; Wed, 10 Nov 2021 16:02:36 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 132FD4540C89; Wed, 10 Nov 2021 16:02:36 +0100 (CET) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH] diskpart: fix crash when diskpart format is not set Date: Wed, 10 Nov 2021 16:02:34 +0100 Message-Id: <20211110150234.1229950-1-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
diskpart: fix crash when diskpart format is not set
|
expand
|
diff --git a/handlers/diskpart_handler.c b/handlers/diskpart_handler.c index e08c10e7..aeae1ad5 100644 --- a/handlers/diskpart_handler.c +++ b/handlers/diskpart_handler.c @@ -952,7 +952,8 @@ handler_exit: WARN("Error deassign device %s", img->device); handler_release: - diskpart_unref_context(cxt); + if (cxt) + diskpart_unref_context(cxt); /* * Kernel rereads the partition table and add just a delay to be sure
If a filesystem should be formatted but no support for filesystem was compiled, SWUpdate crashes with: [ERROR] : SWUPDATE failed [0] ERROR : Partitions have fstype entries but diskpart format support is missing ! swupdate: ../util-linux-2.35.1/libfdisk/src/context.c:516: fdisk_get_parent: Assertion `cxt' failed. Check fdisk context pointer before cleaning up. Signed-off-by: Stefano Babic <sbabic@denx.de> --- handlers/diskpart_handler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)