Skip to content

Commit 1b5fde4

Browse files
committed
11796 libpcidb leaks file descriptors
Reviewed by: Toomas Soome <[email protected]> Reviewed by: Andrew Stormont <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Approved by: Dan McDonald <[email protected]>
1 parent 71a582f commit 1b5fde4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

usr/src/lib/libpcidb/common/pcidb.c

+3
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,14 @@ pcidb_open(int version)
340340
}
341341

342342
if (parse_db(f, h) < 0) {
343+
(void) fclose(f);
343344
pcidb_close(h);
344345
free(h);
345346
return (NULL);
346347
}
347348

349+
(void) fclose(f);
350+
348351
return (h);
349352
}
350353

0 commit comments

Comments
 (0)