Message ID | 20200628151826.952807-1-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBSHJ4L3QKGQEPW5WTEA@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13e; helo=mail-lf1-x13e.google.com; envelope-from=swupdate+bncbcxploxj6ikrbshj4l3qkgqepw5wtea@googlegroups.com; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=NHvLcgnt; dkim-atps=neutral Received: from mail-lf1-x13e.google.com (mail-lf1-x13e.google.com [IPv6:2a00:1450:4864:20::13e]) (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 ozlabs.org (Postfix) with ESMTPS id 49vvQk3HW7z9sPF for <incoming@patchwork.ozlabs.org>; Mon, 29 Jun 2020 01:18:37 +1000 (AEST) Received: by mail-lf1-x13e.google.com with SMTP id e19sf3780979lfn.17 for <incoming@patchwork.ozlabs.org>; Sun, 28 Jun 2020 08:18:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1593357513; cv=pass; d=google.com; s=arc-20160816; b=GrAudOgiVaK4RoK6ZryOQ7yqbDaMKTwtyRel0Azstys38Hj/OUMSqnoPzDR95PYFmk 1ESqDtAvlgKjRi44rSmBfxK5giKhenh4sOy12/79zF9LaqgkIqAotAybknPwNOT4kdy9 kZb+uIb9h7pn9j0+rqUgXp8Wr9B85cuIJrN52czwyaIzMbWDukA70UxlCPYgSB/4J7JN 8QktzKX+Hgbecs8H0sjHz43gbPIyQz59iIKTaWW3a1ISrKWrO4tl8Lj1gzWMyG+gI7m9 YcTcRDImOabFUjvYYfYZ5JjJE8GtHkGDCHy9HRyGWON6UJvY3IkNl6bdDPRmXPhpNdWW Qkyg== 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=6mAzrw2BcqLhtzxC+xdQjiBJeKHNiFjHwZve4UE2T/Y=; b=SfKtbrk3X331haIWIg06pg6c1X9s9/F5YcxjUWnHsPgRcu+yYl1jPQqNbG1TOj1jVW 2jLinKSw1ALR9qIz/3R1JgUOfRhVYUF7mibuw2FQNp3S4FFei9z2UfIZCsCwCHauugwY g4zLQb40gmYVpZke34t9qX7kSaf0MzzUVyRJm4Rtzp8s4Vvgxv9I6tMdyNPv9iRKfxZW XtwDvHVRpt6Fh+u8StBgb/HG258aWeL0CjmPbl1dVS5pyvKVo5ns4SjvgRVWla5A1cZ6 NDhC1SU8v4qCGgPtc0oPK7qrUCykI7e/XTDSBqFfBaoUEJOureuhsM3oXZya1p4sSAWr 3pAg== 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 best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=6mAzrw2BcqLhtzxC+xdQjiBJeKHNiFjHwZve4UE2T/Y=; b=NHvLcgntKzeMOocQX2/I5JW8+nFEqbBdW2mmXsHJYZNE0J3RitnxBr503sxR1Kl2r2 8q2LAofdovwzpY3yaU+FelLJ/+9FyaXWq3Ovb0XdhYurhQHQEvZn1adgsWiCbW+iBubi RqRUsSiCbqTNWQiNBN2cHhYYsQrSTkBjgBtl/9L59LKND4sSqV5/XHAUFpyOJeIyCwaa SutlRyp60noBBUwRBwZEFJ5meq/sIA2nEWqsHOa+LJ4M+khQPtUaD7i7qOwo2LzEncEs SqGr3jky9oqnFfKw0Zg4EIZ9N7rLa7flkIZ5DbOQ0raXsztTDNWGpGrHo+a3NZ2P3td5 9D+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=6mAzrw2BcqLhtzxC+xdQjiBJeKHNiFjHwZve4UE2T/Y=; b=Ta9yd/H5vxbAfmDw4TA/E2aJ5AdKy5egdF/ehA9nb2ZL1DSWZpq9mgKVUjMfk82U/X Atlz/mZkWgRucxIpd7ZBAcee8CpOs9pTmIfOHYGUPjhbGchYqIOR/gWw5QTJc5NSgmjY xDHpI2iortmAp8vvmSWd+ZvBF12VOg/SYL2WqEQNRwV1lRar7zmWJFtoVM+wsJP2BjJM 92aPKQy+7BX4xj0im7rTrSRy36WMJAJGhZcxn+7MO+HaUfFfzjTmQRue2iWA1xycjZi8 YgREFUv7UL9jqkktUY/O2EyFgpt7W0ZyodHJQEkaVNIh4g1QCNLcDWiUSxS3SYknYa2/ EBkQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533+ih0IBnFaz4nT9zQIsfQl/SI+6/zM/8m14+AeW3eCxaT5t8fw V38a1Iv8XyxQFe+qQM0OPtw= X-Google-Smtp-Source: ABdhPJyP7JS/CvV+kpHofaPzXBIYVwMbZmICUKa7oiwX4cLhN29uux6ikTtwjp4k8vmQ0DsHuznEIg== X-Received: by 2002:a19:7002:: with SMTP id h2mr7028570lfc.62.1593357513045; Sun, 28 Jun 2020 08:18:33 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:864a:: with SMTP id i10ls2630228ljj.8.gmail; Sun, 28 Jun 2020 08:18:32 -0700 (PDT) X-Received: by 2002:a05:651c:512:: with SMTP id o18mr6567415ljp.226.1593357512085; Sun, 28 Jun 2020 08:18:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593357512; cv=none; d=google.com; s=arc-20160816; b=fZ5mO0qKGX3V/UH1NGGDtYEk/RwAMLA5XjZT8G1RWYQ+YQLfX0PyCGqfUEx27NYIaa PFBDkk/nvOSZ8jQcd6oS7tAGdF0hxACJaHlkUSJF0LvWHq6TpCon6rx7KbmsrTie3KhE N4AiGUMcd0E0lbQtzIfPNbwIBCkGDKhDZrOL5wUECzsgfU2mU4BEuNi19Rh6ZDH5aGKx 1HcR9Fvqr81Qmwbl9RgFznsjCA4Gm2ieUAsSPkbibnI/liL677d74RFPUkXAi/PB5jTO WwtjYCj9CQx4vHYctohfiEwxnwUeabKyW9KPNrXKDkKEZqYH9xgsAfkapeiWnRtO/An4 OEag== 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=vj1UcC9YlVtgzuyljQwS6rl83NbXikBsZvHOX3mX1Do=; b=tBs/+xBzlzFltiE8AeP0+E5R4you0tnyvia2QaKQ+kokqZgpjtEr3vAsRoTirnMrK4 L8w2xo59OpU++yKevECtXMJOZN6QckttEltLPQ0BaXl17nmTlYoR3iaQ4ll4vaTkcrX0 6X9rFThk3sTzvbdGvlCFS0hoTQ2T91qI35PK6XFggXKqHpzE50qX6oo7OnZESMIfUCEd c6maiyoeYsOY7x7BBJQ+cbXIAy95MrqWp5DPXRL/yUFyuphN7Ky0RUWWdfpGmv8g5tV0 0qbt9rNflKs7Uqk3yFIO+UJakTEKR+pZoC4SJf4znWvaIyj1aR9vrW1mhFUWT6QLxFHf HYTQ== 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 best guess record for 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 u11si2083064lfl.4.2020.06.28.08.18.31 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Jun 2020 08:18:31 -0700 (PDT) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for 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 49vvQb2zcdz1rsNT; Sun, 28 Jun 2020 17:18:31 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49vvQb2WV9z1qw6c; Sun, 28 Jun 2020 17:18:31 +0200 (CEST) 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 4snvg-BDwOyf; Sun, 28 Jun 2020 17:18:30 +0200 (CEST) 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; Sun, 28 Jun 2020 17:18:30 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 4EBD1454053F; Sun, 28 Jun 2020 17:18:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id UB-dTVy1zojt; Sun, 28 Jun 2020 17:18:27 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id C45144540511; Sun, 28 Jun 2020 17:18:27 +0200 (CEST) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [libubootenv] Fix coverity #293503 and #293507 Date: Sun, 28 Jun 2020 17:18:26 +0200 Message-Id: <20200628151826.952807-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 best guess record for 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 |
[libubootenv] Fix coverity #293503 and #293507
|
expand
|
diff --git a/src/uboot_env.c b/src/uboot_env.c index 637b61d..8917513 100644 --- a/src/uboot_env.c +++ b/src/uboot_env.c @@ -1371,7 +1371,7 @@ int libuboot_initialize(struct uboot_ctx **out, } int libuboot_open(struct uboot_ctx *ctx) { - if (!ctx || !ctx->envdevs) + if (!ctx) return -EINVAL; libuboot_lock(ctx); @@ -1381,7 +1381,7 @@ int libuboot_open(struct uboot_ctx *ctx) { void libuboot_close(struct uboot_ctx *ctx) { struct var_entry *e, *tmp; - if (!ctx || !ctx->envdevs) + if (!ctx) return; ctx->valid = false; libuboot_unlock(ctx);
Signed-off-by: Stefano Babic <sbabic@denx.de> --- src/uboot_env.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)