Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107166587
D10588.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D10588.diff
View Options
Index: head/sbin/camcontrol/fwdownload.c
===================================================================
--- head/sbin/camcontrol/fwdownload.c
+++ head/sbin/camcontrol/fwdownload.c
@@ -550,8 +550,7 @@
fprintf(stdout, "Firmware file is valid for this drive.\n");
retval = 0;
bailout:
- if (ccb != NULL)
- cam_freeccb(ccb);
+ cam_freeccb(ccb);
return (retval);
}
@@ -753,8 +752,8 @@
goto bailout;
}
bailout:
- if (ccb != NULL)
- cam_freeccb(ccb);
+ free(ptr);
+ cam_freeccb(ccb);
return (retval);
}
@@ -913,8 +912,7 @@
bailout:
if (quiet == 0)
progress_complete(&progress, size - img_size);
- if (ccb != NULL)
- cam_freeccb(ccb);
+ cam_freeccb(ccb);
return (retval);
}
@@ -923,6 +921,7 @@
char *combinedopt, int printerrors, int task_attr, int retry_count,
int timeout)
{
+ union ccb *ccb = NULL;
struct fw_vendor *vp;
char *fw_img_path = NULL;
struct ata_params *ident_buf = NULL;
@@ -965,8 +964,6 @@
if ((devtype == CC_DT_ATA)
|| (devtype == CC_DT_ATA_BEHIND_SCSI)) {
- union ccb *ccb;
-
ccb = cam_getccb(device);
if (ccb == NULL) {
warnx("couldn't allocate CCB");
@@ -976,7 +973,6 @@
if (ata_do_identify(device, retry_count, timeout, ccb,
&ident_buf) != 0) {
- cam_freeccb(ccb);
retval = 1;
goto bailout;
}
@@ -1048,6 +1044,7 @@
fprintf(stdout, "Firmware download successful\n");
bailout:
+ cam_freeccb(ccb);
free(buf);
return (retval);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 3:37 AM (20 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15760680
Default Alt Text
D10588.diff (1 KB)
Attached To
Mode
D10588: Fix memory leaks in camcontrol
Attached
Detach File
Event Timeline
Log In to Comment