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 740BEA00C2; Tue, 27 Sep 2022 10:27:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52A7D41133; Tue, 27 Sep 2022 10:27:09 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id AC7FB410D0 for ; Tue, 27 Sep 2022 10:27:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664267227; x=1695803227; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3QjVZuubKYkhX2h7bV3Ai8JG0F7oznDEDFI50/EW6mY=; b=RPqcbPepqLTNPStjFm0slDCMk9nLyDGYLcFB4EoodozMGp7ttO1BHvkT YdhqY2bQa4ghNDeHjDX+GdR+SpMUFd5KqKWQkPGJQvge2rHPGV8d+KcT6 O0xesgaRf4Lki5Emx6wzqied1RPw2mMDkMmCYy6dCSyW9XguPCxPe+8B2 shxTAoUFoCYosTBYUpFzWIP5g80G492tvPodp0VTChprKpaZqtaHEksoe FOD32XEpBs0aK/r67WwPJmxSBaKMQfmIi8DO/KAMV2j/kcfNyJDSlqrcD 3rsU3xSUFBJZ2b96ZyAZiUJSfB29SdM4LTOWWu45Um3MGu+yw4M2HyEWC g==; X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="280977597" X-IronPort-AV: E=Sophos;i="5.93,348,1654585200"; d="scan'208";a="280977597" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 01:27:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="616749878" X-IronPort-AV: E=Sophos;i="5.93,348,1654585200"; d="scan'208";a="616749878" Received: from ena-1.iind.intel.com (HELO localhost.localdomain) ([10.190.200.207]) by orsmga007.jf.intel.com with ESMTP; 27 Sep 2022 01:27:05 -0700 From: Harshad Narayane To: dev@dpdk.org Cc: Kamalakannan R , Cristian Dumitrescu Subject: [PATCH] examples/pipeline: fix file close Date: Tue, 27 Sep 2022 00:35:16 -0400 Message-Id: <20220927043516.366922-1-harshad.suresh.narayane@intel.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 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