mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix resource leaks
Found by: Coverity Scan, CID 1016673, 1007118 Approved by: re
This commit is contained in:
parent
e1a5a8a74a
commit
9d85dfae1e
1 changed files with 2 additions and 0 deletions
|
|
@ -224,6 +224,7 @@ fw_read_img(const char *fw_img_path, const struct fw_vendor *vp, int *num_bytes)
|
|||
goto bailout;
|
||||
}
|
||||
*num_bytes = img_size;
|
||||
close(fd);
|
||||
return (buf);
|
||||
bailout:
|
||||
free(buf);
|
||||
|
|
@ -286,6 +287,7 @@ fw_download_img(struct cam_device *cam_dev, const struct fw_vendor *vp,
|
|||
ata_28bit_cmd(&ccb->ataio, ATA_ATA_IDENTIFY, 0, 0, 0);
|
||||
} else {
|
||||
warnx("weird disk type '%s'", type);
|
||||
cam_freeccb(ccb);
|
||||
return 1;
|
||||
}
|
||||
/* Disable freezing the device queue. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue