summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorcem <cem@FreeBSD.org>2016-05-11 22:25:14 +0000
committercem <cem@FreeBSD.org>2016-05-11 22:25:14 +0000
commit4c080eaa62947a515fc872f7666267fcacf16ea7 (patch)
treeb7a59dda3993d3219354d623ad0a3d16048866f4 /sbin
parent32fca307a1452f54576918043590ebcd86e7ef2d (diff)
downloadFreeBSD-src-4c080eaa62947a515fc872f7666267fcacf16ea7.zip
FreeBSD-src-4c080eaa62947a515fc872f7666267fcacf16ea7.tar.gz
camcontrol(8): Fix another trivial double-free
Reported by: Coverity CID: 1331222 Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sbin')
-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 fc09450..a676370 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