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 1F29AA00C4; Sun, 4 Sep 2022 14:29:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AFB854021D; Sun, 4 Sep 2022 14:28:59 +0200 (CEST) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mails.dpdk.org (Postfix) with ESMTP id F2A724003C for ; Sun, 4 Sep 2022 14:28:57 +0200 (CEST) Received: by mail-ed1-f41.google.com with SMTP id e17so611144edc.5 for ; Sun, 04 Sep 2022 05:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emumba-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=XPCy9kFPaZH1moegr09MzdNWzy39rY//O7xNvLsbR98=; b=x1nHsTe4nc6IeGrKXqbsRq9vgc7G09E2jiNGU+4iauaVeqON47UorfPyqtYYorzgVe C/b3UKRKqUBjiKZqcAApx/yFGNyirBemrv6tBiV05MAd6eiAsUbNYVX5Z9o6SYMqF42g 6biU/8A0AJi+jiUCmtezoj0uOQuNE3oEhSPv+uSP1x29PumEbDyGnjZMFKdOQRuag/FK 89JcVgHe4Wo3CxZL9mXOeUB3gT3yKQEbz1WdTgXwxhDTTD2/rsugmBh1DbVSSyswK6xv nLH2UjAAtBUo/pWq2jZhWfPVYchaeUmdhSAO/LmvnNKIeoTIcOujzZYZEh/pR6Nc+B3I iBuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=XPCy9kFPaZH1moegr09MzdNWzy39rY//O7xNvLsbR98=; b=Zw1G5eqljVYEvJrGqW/pLUeY2Es5r8lmYRf7dwmi5dpDUoevlnZlkUggZgxcj+b2fw CEZfQHzkc3jZieKJLh3ugLQqHuT94Ewozt7wOO0valTVnbdBP2WJXJgObU5SuWhi9X7g ipJfk0O+FrJZTFL1jRM2Dk9ncmor2OygWuSLBw4VWK6GCyq6uHBhb3JIOBeBcg7aBDeU 1EHura5C2QfPNwfZJg99o5zdCcizEy2aOxSU2aIBSya8wYx1ezrYUlTfScYqr7taabHP 7ii599t42rpPAo8CNfcAUjBG06kxBb2sRDoFjfuln4hokzOMgXMqQfEIPssrOeQV6AUa n6iA== X-Gm-Message-State: ACgBeo2AGCZP4kqK2QCnoOBoinSR92x3uIUB2EMFlskTKfYRkw1eSVeH V77MasI7wm6CZt1QjW4dZC4wSA2WG9oLYaA= X-Google-Smtp-Source: AA6agR7AgP+QiEZdt0PkEMu9kKCSiqBWhkn6tew2V5tm5Li7HXJc/lKmeQW46fQxKOa3ubFGqOTEtA== X-Received: by 2002:aa7:d0d3:0:b0:44d:ef98:2075 with SMTP id u19-20020aa7d0d3000000b0044def982075mr3798543edo.122.1662294537609; Sun, 04 Sep 2022 05:28:57 -0700 (PDT) Received: from emumba-Inspiron-3580.Home ([182.191.83.208]) by smtp.gmail.com with ESMTPSA id d2-20020a170906304200b00730df07629fsm3674032ejd.174.2022.09.04.05.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Sep 2022 05:28:57 -0700 (PDT) From: Fidaullah Noonari To: stephen@networkplumber.org Cc: dev@dpdk.org, Fidaullah Noonari Subject: [PATCH v2] app/proc-info: add rte_eal_cleanup() to avoid memory leak Date: Sun, 4 Sep 2022 17:28:45 +0500 Message-Id: <20220904122845.141893-1-fidaullah.noonari@emumba.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 when app is launched with -m proc-info exit without rte_eal_cleanup() causing memory leakage. This commit resolves the memory leakage issue and closes app properly. Bugzilla id: 898 Signed-off-by: Fidaullah Noonari --- app/proc-info/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 1bfba5f60d..9cfcce31ab 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -1523,7 +1523,7 @@ main(int argc, char **argv) if (mem_info) { meminfo_display(); - return 0; + goto cleanup; } nb_ports = rte_eth_dev_count_avail(); @@ -1593,6 +1593,7 @@ main(int argc, char **argv) RTE_ETH_FOREACH_DEV(i) rte_eth_dev_close(i); +cleanup: ret = rte_eal_cleanup(); if (ret) printf("Error from rte_eal_cleanup(), %d\n", ret); -- 2.25.1