Message ID | 20200405094442.10112-1-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBEGRU32AKGQEIYLMNQA@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::539; helo=mail-ed1-x539.google.com; envelope-from=swupdate+bncbcxploxj6ikrbegru32akgqeiylmnqa@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=s0Y0TtTA; dkim-atps=neutral Received: from mail-ed1-x539.google.com (mail-ed1-x539.google.com [IPv6:2a00:1450:4864:20::539]) (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 48w80R0mkjz9sR4 for <incoming@patchwork.ozlabs.org>; Sun, 5 Apr 2020 19:44:53 +1000 (AEST) Received: by mail-ed1-x539.google.com with SMTP id f11sf9151300edc.4 for <incoming@patchwork.ozlabs.org>; Sun, 05 Apr 2020 02:44:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586079889; cv=pass; d=google.com; s=arc-20160816; b=l8gO4wtuGob0Hy7cVmFobPnHHUuuPT5eBmEnfX1yV+R9hoZN8rd7TjKOd9Zc5ghObF vObbWtxaw6+9t1+MHNzRW14rVwBmzWRf6fMcRFVzkyZQK5Lv4ey9bLfR+qqOrPJuLlTc vVsZHIi9jKfbzS0uXaWefbCH3rX6bxARvVYAAs4HLPDKNLgUJxCdkouCb2jdFT2o3UIW ZqOX3ep3nml29qX288v8qF7kUwkVHHSV4U3LyzZKyIPSkOfsmqzlo0NYmXjquPw77EyU B5DglmF3lVlhJ2jW713p70rJo8GY4YLB9z555dA6cTgB1qImtqb4LlAKc2ZxOnOWjdDa yTqQ== 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=P85nULW/eP4ffhh9sGfJiLZBAgk1/+yHVTLJHJT+WxI=; b=fQez0w2NnszpjSeLLt20aG57pON9/xb6FhBZMRdQzO3usr07m3lvVnSO9++EFoSZjs H39rtbjqaEpLCxgF28+inhWfg/jKUeD0mUT+fyIaaRJ5fsGV3YPvsUk6s0wra/QgIYMj 8WDGLxAwh7iSnPoY+L9LCkvlyozRIUzBqG0caGT11An3ZqKmjLjFUjVomcdQVU4lsCc1 d+mkUi0E+cQFNQj3YU5QXw3Pin5PW56h/8F3/WylKyro8IQPPvTueNqYfra7dC0Vry27 m77aRpuHpjxnyZHQP9AzUeskoatDqLCMz99O4m9H9AHYWTmr3S/+650OC9f0hGrzeQ7D 8T2g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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=P85nULW/eP4ffhh9sGfJiLZBAgk1/+yHVTLJHJT+WxI=; b=s0Y0TtTAtH/4kXqWun3i/MQTYAd0yunp9VB4SF6sNw9ZcK86flaQO4gsWaPJeXhTn6 CYtGsGEsy7QoCrX0EA6wfkbpBTdS2nmifqXpcS35QZNMT9E0D5d3e2EBjdioKHo1nbSU sK1kZrWHT4L+sKrLnzxPZvbKtUJc6PoChoqzwpUfosEIYQAl3+/xc4Lyj3+5zD1h9J/h WgSWRzVLa2ZKZKwr6cUqWX1KQ0N2zEBKNLEZ1DFQpBeD/bFJRdF84ciub7nTwB19nNQw c/WRRuerDIuind7YrNsxUzWwKiw4i5bPUrAhbiLtOsGYwo/DpOCT6RPuGvhnqPVcnfb3 g/JQ== 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=P85nULW/eP4ffhh9sGfJiLZBAgk1/+yHVTLJHJT+WxI=; b=Jj/vtAkN5NhIQFUT0XY6+K570PKo/y1I8rrjenJQTUCS5a9wZorzKnEp+UhBCmLj6S H4pEBRIw1jKCLnnsvnyaeXowwzDx64JtMWWX/S4A5/vNDSmOxN3MnA2w4fLqRcsuQTqX 5wUGK3fnCYW4pi7AF9ky9/A1/YFYHoV5phk7LteQeRsaGU657TXgUcBKxhvJdCQsiitC lmtrruLEcpT+5V9swAA19xMQaeAeIrrV5KhnG3XC5jkrolBWl+SGj9EEfhP4Zytud+7h aNaJGYu7BT7UgRbX+VqyS33jHWO/fHwrfLDpNY+n3eNijpIQxGWMXyMbF0WAI0TrGplA +ztw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AGi0PuaGoQIvTuNDM/Td3bR0uCBXboTXJaSa1Oo1PiaFrNixbXGLPpum pC95MRidVOfQAbsR/Nv+O/c= X-Google-Smtp-Source: APiQypJ+lL0dXu7taeWnxpFA8RjnNzOSGiSOj1zqsFSbuuHXDcPgnJJIC8y2btMLn1wnoOnkC30Dow== X-Received: by 2002:a05:6402:206e:: with SMTP id bd14mr15203102edb.308.1586079889266; Sun, 05 Apr 2020 02:44:49 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:906:9498:: with SMTP id t24ls6420767ejx.6.gmail; Sun, 05 Apr 2020 02:44:48 -0700 (PDT) X-Received: by 2002:a17:906:f84f:: with SMTP id ks15mr16212096ejb.362.1586079888521; Sun, 05 Apr 2020 02:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586079888; cv=none; d=google.com; s=arc-20160816; b=AXDX8GgamIA6aUD7pNKLisTnA1K2/sj07l7u0pq7OFJio71jx1ZdMkpKfk9V5an4kt YMt8pDrqCbQ3aIGu+8ltgNvUZ/GwPS9/aidtdWD4+RVIOuK4uOEG8mRo1kDZq4jfMUft E6pqv4cmJB9tV9n6wnmGgQWB9Al1JvJ3qOPZVMkHsqAkJQMVBDDTLtwwAY0Jbi6OIMC7 fvOG4AhaThN5dPbH9Zt2AdJgPyVB0VWUAAsyAimcgWzl+rU+QJtv5e7GjYTE2I9LUx+0 OBWoTncW9GyfEh+xA9iUyl8SfV0D43cG0MpwSSYjjER5Gp6SJdD87HmCqWxQCvhb7mUl 6xiQ== 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=3iskWvtSWTBjP+ZJzakOh5GjjK8AQaZ/mfxptXJ0guE=; b=nit9f7yDWVEGhqmVB/FgMynI+rAPQQ6W058SqQ2VaDSZTwoV+MgMiRi/hQmbJMtPl0 kiJcFqiL59DLEbLBxhZsLNkp7g7/B0xS3cx4r9UHkeu2dMslqkObPe1kiZ0nvWNBbTGC A8sPKG3iREixVbTzM5LEpp4/GK4VEudya6undxSW/bvECoQ+h6QZ7vKqBnOLayUYEq9n r+biZgc9kL520l8cI+GFqcYLYjvrIQUpoi8e3AAj5NVfm7DhY0yA3f3MEnQIJMjZB3nj 65c8LKDg3yhdkr1p/q3Ifs/SpZzzR4RSy8vILEC1ms/N8p0oKu04oOgPXGBIgjsGmcGW sCeQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id j9si1014906ejx.0.2020.04.05.02.44.48 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Apr 2020 02:44:48 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48w80J1xlsz1qrFP; Sun, 5 Apr 2020 11:44:48 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48w80J1jxNz1qqkk; Sun, 5 Apr 2020 11:44:48 +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 7oYEIXFrdkWt; Sun, 5 Apr 2020 11:44:47 +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, 5 Apr 2020 11:44:47 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 1182F454060A; Sun, 5 Apr 2020 11:44:48 +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 BayommGUKOGy; Sun, 5 Apr 2020 11:44:45 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.38]) by babic.homelinux.org (Postfix) with ESMTP id B07CE4540618; Sun, 5 Apr 2020 11:44:43 +0200 (CEST) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH] Fix resource leak in extract_scripts Date: Sun, 5 Apr 2020 11:44:42 +0200 Message-Id: <20200405094442.10112-1-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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 |
Fix resource leak in extract_scripts
|
expand
|
diff --git a/core/installer.c b/core/installer.c index 879f3c1..1f6c862 100644 --- a/core/installer.c +++ b/core/installer.c @@ -139,6 +139,7 @@ static int extract_scripts(int fd, struct imglist *head, int fromfile) if (fdin < 0) { ERROR("Extracted script not found in %s: %s %d", get_tmpdir(), script->extract_file, errno); + close(fdout); return -ENOENT; }
Fix coverity #292217 Signed-off-by: Stefano Babic <sbabic@denx.de> --- core/installer.c | 1 + 1 file changed, 1 insertion(+)