From: Yangchao Zhou Date: Tue, 17 Apr 2018 05:59:08 +0000 (+0800) Subject: net/nfp: fix possible resource leak X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=687790cf9a59add341b0271703638b1e4dad565e;p=dpdk.git net/nfp: fix possible resource leak Fixes: c7e9729da6b5 ("net/nfp: support CPP") Signed-off-by: Yangchao Zhou Acked-by: Alejandro Lucero --- diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c index d26e782bb9..4e6c66624a 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c +++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c @@ -815,6 +815,7 @@ nfp6000_set_barsz(struct nfp_pcie_user *desc) if (fscanf(fp, "0x%lx 0x%lx 0x%lx", &start, &end, &flags) == 0) { printf("error reading resource file for bar size\n"); + fclose(fp); return -1; }