From patchwork Thu Nov 8 11:44:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatoly Burakov X-Patchwork-Id: 47940 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A6E42493D; Thu, 8 Nov 2018 12:44:20 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 0CBBB239 for ; Thu, 8 Nov 2018 12:44:18 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2018 03:44:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,478,1534834800"; d="scan'208";a="248023525" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga004.jf.intel.com with ESMTP; 08 Nov 2018 03:44:17 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id wA8BiGKd012971; Thu, 8 Nov 2018 11:44:16 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id wA8BiGEr006020; Thu, 8 Nov 2018 11:44:16 GMT Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id wA8BiGc0006015; Thu, 8 Nov 2018 11:44:16 GMT From: Anatoly Burakov To: dev@dpdk.org Cc: bruce.richardson@intel.com Date: Thu, 8 Nov 2018 11:44:16 +0000 Message-Id: <9c2fc1a970820a780ecf050bb8b669d9bcd64e7b.1541677243.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] test: add missing cleanup to one of the failure paths X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" One of the failure paths were not updated to clean up on exit, most likely due to rebase error. Fix the failure path to clean up instead of simply exiting. Fixes: 3f9e31d71d63 ("test: clean up on exit") Signed-off-by: Anatoly Burakov --- test/test/test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test/test.c b/test/test/test.c index 24df6299e..12fabd0ba 100644 --- a/test/test/test.c +++ b/test/test/test.c @@ -102,8 +102,10 @@ main(int argc, char **argv) /* merge argc/argv and the environment args */ all_argc = argc + eargc; all_argv = malloc(sizeof(*all_argv) * (all_argc + 1)); - if (all_argv == NULL) - return -1; + if (all_argv == NULL) { + ret = -1; + goto out; + } for (i = 0; i < argc; i++) all_argv[i] = argv[i];