net/nfp: fix possible resource leak

Fixes: c7e9729da6 ("net/nfp: support CPP")

Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
This commit is contained in:
Yangchao Zhou 2018-04-17 13:59:08 +08:00 committed by Ferruh Yigit
parent 4b954bb167
commit 687790cf9a

View File

@ -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;
}