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 E5A90A00C2; Tue, 27 Sep 2022 08:58:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C84194113C; Tue, 27 Sep 2022 08:58:56 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 38F5A4069B for ; Mon, 26 Sep 2022 16:33:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664202821; x=1695738821; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3QjVZuubKYkhX2h7bV3Ai8JG0F7oznDEDFI50/EW6mY=; b=n0/Ra4wLjIzzBHGcFAYpc7wkBKAtYurQoRvqN+0Nh2eBJeLGLVDjuvTK 4HCYr39OdsY2RS2ekavzw0EdTFDdSfRX/CFN6iuuj+TcA9pQlC1KbT7ka wKWnjmFWLfAWtVZLyS55VxmoePdxdY7esq9UAFBdk5RbmBy/Bfm3uME45 RVC6B+6/5GGfgpTOXw0YRtdhj+FHV3KL1tSc3KoQ226+8JCry/MIfhoq6 e6rLciKNzJq9Yt4o2QM2201XoYCV2IS+0QRKcBFXowiXAav5UwZrmbE5h TxUHVzh3sfY48l0SCJ1kF65Z9PmyutMYZyv/6BuPb1j7sTL3fMSSP3krD A==; X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="288181035" X-IronPort-AV: E=Sophos;i="5.93,346,1654585200"; d="scan'208";a="288181035" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2022 07:33:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="616421633" X-IronPort-AV: E=Sophos;i="5.93,346,1654585200"; d="scan'208";a="616421633" Received: from ena-1.iind.intel.com (HELO localhost.localdomain) ([10.190.200.207]) by orsmga007.jf.intel.com with ESMTP; 26 Sep 2022 07:33:38 -0700 From: Harshad Narayane To: dev@dpdk.org Cc: Kamalakannan R , Cristian Dumitrescu Subject: [PATCH] examples/pipeline: fix file close Date: Mon, 26 Sep 2022 06:41:32 -0400 Message-Id: <20220926104132.355541-1-harshad.suresh.narayane@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 27 Sep 2022 08:58:55 +0200 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 Coverity issue: 380860 Fixes: 9043f66a ("examples/pipeline: add command for code generation") Fix file close at pipeline code generation. Signed-off-by: Harshad Narayane Signed-off-by: Kamalakannan R Acked-by: Cristian Dumitrescu --- examples/pipeline/cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c index 8013541c4b..1158e51e89 100644 --- a/examples/pipeline/cli.c +++ b/examples/pipeline/cli.c @@ -545,6 +545,7 @@ cmd_pipeline_codegen(char **tokens, code_file = fopen(tokens[3], "w"); if (!code_file) { snprintf(out, out_size, "Cannot open file %s.\n", tokens[3]); + fclose(spec_file); return; } -- 2.25.1