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 BC0ABA00C2; Tue, 27 Sep 2022 08:59:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDEB542685; Tue, 27 Sep 2022 08:58:57 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 54161410D0 for ; Tue, 27 Sep 2022 08:21:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664259698; x=1695795698; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3QjVZuubKYkhX2h7bV3Ai8JG0F7oznDEDFI50/EW6mY=; b=JYiA13Bl1uu5dJWhPW7zLWwlWczfOU4Akxy8buOzNEjj2Kak5l8RCjb0 w3+amOoXPBzpMueiqkNZPNBJocnWJM47Mi3skCaFkm7VINj5iFpRVXxIN 5enOq8qJLhgUqpX8ssBzDLof0f2NkK4bp+LdawiRB/7lAOSfQhOzQJBOw 6qVZ1TL9Q9fUWFQuTfbDe6oWd6dQ0wt1NR/3VJe8QUYJ3OYihnQkMy/YH 410Yd6IoT8GqN0OfBns9voynnpGTn7iQc7SeCbsfWEqSG60jkNCOhv0tK 0UnTDNieWmXAQMZbTVra+LjisbLTXZOXYZEZZ/O4eA6VfW19FBvsD1IOu A==; X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="301212270" X-IronPort-AV: E=Sophos;i="5.93,348,1654585200"; d="scan'208";a="301212270" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2022 23:21:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="763755638" X-IronPort-AV: E=Sophos;i="5.93,348,1654585200"; d="scan'208";a="763755638" Received: from ena-1.iind.intel.com (HELO localhost.localdomain) ([10.190.200.207]) by fmsmga001.fm.intel.com with ESMTP; 26 Sep 2022 23:21:36 -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 22:29:45 -0400 Message-Id: <20220927022945.365620-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