From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88A7FA0548; Wed, 16 Jun 2021 18:24:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22E184067A; Wed, 16 Jun 2021 18:24:57 +0200 (CEST) Received: from mail-pg1-f228.google.com (mail-pg1-f228.google.com [209.85.215.228]) by mails.dpdk.org (Postfix) with ESMTP id 4610440140 for ; Wed, 16 Jun 2021 18:24:56 +0200 (CEST) Received: by mail-pg1-f228.google.com with SMTP id v7so2422824pgl.2 for ; Wed, 16 Jun 2021 09:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Qb8+XFFqZzWIaSS/gXqPp9VV1SjMUn0CINgUZR+wIzU=; b=QqYZB4FgFsq2Ce1U3YWdqKOZsvt0BdXZPFz9fX8YsaTPH3SazBARhqqj7GYdSZhfy1 G7UnSV+Asuywdrd+8n+qpb2w/XbrYSFDcJ7+b/euIA3ezSSgPp4tY+fBqtn4ZL9CZ9Oy c6M8tW0PKn+ZySd/uUSid05tvxqyyOSBIiHvc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Qb8+XFFqZzWIaSS/gXqPp9VV1SjMUn0CINgUZR+wIzU=; b=WBu5+5fngT9jhjRxv40LYH/kBVIHa5Wc62mIxfQz/fmqfanYFTamxErgbMA4KWF7rq hyDIyRJSGN+jaALs1rbsRnkmW8C3WsBsDAE5cmRzhmX9tbveivZbZ6cTiccj6Nz98N6O f0t8yT+UIfvOKFzHEdftVpe3IG6SBihbeRI4acHPIpckxFgOyY8eknlorRQFrztEVdbI O1WMvRyAyvkTdFBhXt27Kd1uUZDMdKSKIRJ6B2A1CiveDr8Q/6CpdRH8jzdwWsE7/ISH nlzTCPDCXib8Yv76uesVpqaWGDtsL1AN9bCajZ11RKD8SA+8Qsv4e8oB1Df25Yk0olHt Ywwg== X-Gm-Message-State: AOAM530wZSHpAUMTCk0CfrxLeMQCFxM8VKheREqP5lypjoNqsu3aGpPt mfq6X6o31jD0FZNQdK9WuENgWdqtNjpJoeobP1u0eO/lYgVzW2rHwKt4J3CJlcPY6EL0JS4T1Tb /OskADkfWrYweXOtNVA87J1+PVkN8STw+pOTw+BdLPn70TLl8PZTdBrgRGuc2htvXbFYDxCzR4E A0aEz8btqj7EfwZg== X-Google-Smtp-Source: ABdhPJzHvc/CmykD1hfxVFgoWFTF8UzQbpOTsXzaKCCaL+uc5iW2c9VDVmFEiEgx7aFV5WVzCcEreLZePrR6 X-Received: by 2002:a65:6248:: with SMTP id q8mr421724pgv.186.1623860695322; Wed, 16 Jun 2021 09:24:55 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id bj23sm2445164pjb.1.2021.06.16.09.24.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jun 2021 09:24:55 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1220:5e2f:685e:142b:54c3]) by postal.iol.unh.edu (Postfix) with ESMTP id 9C05B605246B; Wed, 16 Jun 2021 12:24:54 -0400 (EDT) From: ohilyard@iol.unh.edu To: david.marchand@redhat.com Cc: dev@dpdk.org, Owen Hilyard Date: Wed, 16 Jun 2021 12:24:52 -0400 Message-Id: <20210616162453.349614-1-ohilyard@iol.unh.edu> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] tests/test_eal_flags: fix memory leak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Owen Hilyard The directory steam was not closed when the hugepage action was HUGEPAGE_CHECK_EXISTS. This caused a memory leak in some parts of the unit tests. Signed-off-by: Owen Hilyard --- app/test/test_eal_flags.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 932fbe3d0..0c1e0fb21 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -125,6 +125,7 @@ process_hugefiles(const char * prefix, enum hugepage_action action) { /* file exists, return */ result = 1; + closedir(hugepage_dir); goto end; } break; -- 2.30.2