summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-06-10 14:33:21 +0000
committerngie <ngie@FreeBSD.org>2016-06-10 14:33:21 +0000
commite9925ba39840661daa4c89e67c6d3300fb1bd671 (patch)
tree2318af88cc89f4bae96e0cf3dd142a0443174b17
parent684fc9f22380952a2fa5f6eee5de13a77de7aea6 (diff)
downloadFreeBSD-src-e9925ba39840661daa4c89e67c6d3300fb1bd671.zip
FreeBSD-src-e9925ba39840661daa4c89e67c6d3300fb1bd671.tar.gz
MFC r299490:
r299490 (by cem): camcontrol(8): Fix another trivial double-free CID: 1331222
-rw-r--r--sbin/camcontrol/fwdownload.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/camcontrol/fwdownload.c b/sbin/camcontrol/fwdownload.c
index 2c2d12a..8049606 100644
--- a/sbin/camcontrol/fwdownload.c
+++ b/sbin/camcontrol/fwdownload.c
@@ -488,6 +488,7 @@ fw_validate_ibm(struct cam_device *dev, int retry_count, int timeout, int fd,
CAM_EPF_ALL, stderr);
cam_freeccb(ccb);
+ ccb = NULL;
goto bailout;
}
@@ -549,7 +550,8 @@ fw_validate_ibm(struct cam_device *dev, int retry_count, int timeout, int fd,
fprintf(stdout, "Firmware file is valid for this drive.\n");
retval = 0;
bailout:
- cam_freeccb(ccb);
+ if (ccb != NULL)
+ cam_freeccb(ccb);
return (retval);
}
OpenPOWER on IntegriCloud