From patchwork Wed Apr 15 20:11:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1271416 Return-Path: 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=2607:f8b0:4864:20::63b; helo=mail-pl1-x63b.google.com; envelope-from=swupdate+bncbcxploxj6ikrb2wu3x2akgqertpiy3q@googlegroups.com; receiver=) 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=KHF7w1bj; dkim-atps=neutral Received: from mail-pl1-x63b.google.com (mail-pl1-x63b.google.com [IPv6:2607:f8b0:4864:20::63b]) (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 492YQl1gqgz9sQx for ; Thu, 16 Apr 2020 06:11:26 +1000 (AEST) Received: by mail-pl1-x63b.google.com with SMTP id y12sf1013894plk.23 for ; Wed, 15 Apr 2020 13:11:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1586981483; cv=pass; d=google.com; s=arc-20160816; b=tfYsgJzQr2iz1KF+ZTL8uENnPaMhx00cIchzkh8J4oSabi1vTOijA7Hvz0vw1ibWQM tS4bHJxP1XJize8jzQ4wlM+DyW0qff+45H9Q+rnBg6nfZi2e4wgxOcX+om2w1g9nUkud WIS3pS8wx6a2HQF2+9Bx/DnThpwdlmt9pxYF5pWY04CLyP611RevXNQ1+yGGkhkfj2yW CeFSQwv1jmCMfQuvDWC4+2j/U8k7AuEYJIw4oPFm+So/JIac92bioaJZMdAt481lI/TI UQNt6qmlktMYjjeFXn48SIB3jypYpd1JQ6tkoqW4cr+RqEugzYPrJ6LCxv7t+saewJOZ PqvA== 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:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=witY7XujI605zb+FHZiMefinEEoOsH+NaEQ+iUDNi+k=; b=QT6L3iaACUTH1qzYlXMlLSHivjE7siqfB8fkzhsl5XpY9mptJgA6I1paagmflSlnEq ZI81t/to1eh3H1ByBKtueNlVCKEjTqvHFQSB8Eavz2afhqrFh6pCTIxQVQoNboj6oFjt 0FTaEgGi5RE4BLrFlwdOaEoPpK+oihMpNH0VDEmtw6fI+Dhtko0Nl6XDHqiEHjcriRVl 5iIilywc8Mt+LKLoHOZ68PmyAg5Y8yu3r1T2Ty2GYbL4L16W946QcTLYjN+IBsYZFioA Vf28BaQ21PD6a5XXwD6sl9iKtkG2SYYepEaC0qIkJ0pEM99Tm/WXqW2f64rRcm0wGwXd xoUg== 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:in-reply-to:references :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=witY7XujI605zb+FHZiMefinEEoOsH+NaEQ+iUDNi+k=; b=KHF7w1bjR5j4V+f+DogM9YApb+hSff4fwwo7pch8+p4D0iH5rTxTQq9JvaIOL6IMsC Bo/9rtalLD9ZcRUjpF3M3S5Ronb2tU+RpyPGrk8XG54stvpdqxcEQ1+1S62isMn4L8u/ 1EQN+wZdfQ6YxiEoNH/89daKE2AOxLWq+7/LIk0g76ETopQVulYQkCyLJoypP9ajStnv 99HXEJb7nPQNh4k6xtLuWzhuE3e5uSG8qzX+KGTu72Dl7xoc8zICEWJl93O5uJt7E9zo RECGRFRKYKHKSecG91yVVxl1M2ExuiUIEHo40phbELoCdKUjHIkV2kfzpg4uYLRdDRS4 7daA== 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 :in-reply-to:references: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=witY7XujI605zb+FHZiMefinEEoOsH+NaEQ+iUDNi+k=; b=A30hDIqjoT1tWsLBFQ3qDPlSq3w1KuZdsbrNlaEXvXQfUzBVd/2dsSFFEPOsDR1+23 lZZJ8iCCncOFKriHZaE/y5M0hF1J2StjoGMzi4ih2D32SyTZHVgZIh5Q8XFnf6TkJKyi Y9q6Y1RhdZI/91HdDNJr/2atX3Vptdz0KUbXU+LzxfmXHloZndzO8sf7bgsmXdkcOejL NBVhb2zurknyAls8MeQ+z5F6N9UpDiwcDJnLsVFjSQiOB/SCtSV3+0YxrtfzELOy6JmU fat47S6CgIC26ePj3oostZiobQN8dZV36YaUwmmK4JCtqg5q7mzEb9+OmpZjXqYKvGf3 1ErQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: AGi0PubsZipMDWE+tqzfjW+nPiAJCPyfFgJEUKQmRT0e46IrydXnrxZH 4LNdAdMnbUAF3i1lN9e6/wA= X-Google-Smtp-Source: APiQypIkLDbWD7BqmMLHLXL588bBiLaQD7cp56wT5QCpdetbP7pi8wZiPS5lb9tlJoUuADpU7Fw2BA== X-Received: by 2002:a17:902:8b82:: with SMTP id ay2mr6761113plb.285.1586981483353; Wed, 15 Apr 2020 13:11:23 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:90b:23ce:: with SMTP id md14ls1245433pjb.1.canary-gmail; Wed, 15 Apr 2020 13:11:22 -0700 (PDT) X-Received: by 2002:a5d:5745:: with SMTP id q5mr24170538wrw.351.1586981481914; Wed, 15 Apr 2020 13:11:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586981481; cv=none; d=google.com; s=arc-20160816; b=W1PUhp8R4/PfGnY7ky0VkkQiWveUsKXx4Q+ySFlaSmDwrl7baNAwq05E5NIUcdKhhp NfZjUnIkbHlu9QYHhnmPwSBSCLSeXCHNL15R3SASl2q1fRlska/8RKSopG3NdVzGDnOq sKup/5qmav71yj3gAajzQTlsFShjPQeWME0JoVp0exgGehF7quQ8N/01pgEoAfl8pFzu cIJSIiYCS5jb5DmsqyYMh/F4pydJsXUuS9c8C1VVvD64sUs7YYGZdHdltZ52+XCn3fzY X3bk9xKEdS9t5bYFynYaext43fAwsxEUiOBLT2jM/kkyWRaijggG+3lLSI5Kp3hdfkHu TQDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=rlpcTBcBjycKte7tKnQnNOMkuwfNUzu0+rpxACeSbLk=; b=K+45aFzoXLeS9rD2Cgo8JzNrq3KHmmkydjlViVNpyqkdxH3++9j6fAte/74YKDmFtV D+iqVmfDKGvrr20/E5jHPdU3V8IuZCwle5v/ChqRRc6J0+rHhG8TQ/6X+n+ZTliqq2CK Tb4jpl7Gnb1VWR5wAe3prRxpnr//R7fK3CmRwa5cWptQboIbSGqtavE/U3dyz8vTX/uk C14EBEhCnaLOO3pp0qKbdJzuYBVu79qWUwAwbOoTOoq8uxf/3Stido7hSJe3jf6l/LJg UCeRK9OYsTqz8DQz7rJ1sdGZ5vcdABit4iPizviASEF8i4x9cwz3gdk4JTHlBFOQsCOZ DyMA== 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 u16si61771wmd.2.2020.04.15.13.11.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Apr 2020 13:11:21 -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 492YQd5Dhbz1qrM1; Wed, 15 Apr 2020 22:11:21 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 492YQd54gJz1qqkT; Wed, 15 Apr 2020 22:11:21 +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 PtJcn-dgEip0; Wed, 15 Apr 2020 22:11:21 +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; Wed, 15 Apr 2020 22:11:21 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id BEAFE45403CF; Wed, 15 Apr 2020 22:11:20 +0200 (CEST) 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 sU8MJChWl2H8; Wed, 15 Apr 2020 22:11:17 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.38]) by babic.homelinux.org (Postfix) with ESMTP id 92E874540528; Wed, 15 Apr 2020 22:11:17 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH] Fix resource leak : #292187 Date: Wed, 15 Apr 2020 22:11:13 +0200 Message-Id: <20200415201114.876-2-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200415201114.876-1-sbabic@denx.de> References: <20200415201114.876-1-sbabic@denx.de> 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 Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Stefano Babic --- core/swupdate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/swupdate.c b/core/swupdate.c index 1dc2053..48d9f49 100644 --- a/core/swupdate.c +++ b/core/swupdate.c @@ -288,6 +288,7 @@ static int searching_for_image(char *name) free(dirc); free(basec); + closedir(path); return fd; }