Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107053545
D46014.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
D46014.diff
View Options
diff --git a/usr.sbin/fwcontrol/fwcontrol.c b/usr.sbin/fwcontrol/fwcontrol.c
--- a/usr.sbin/fwcontrol/fwcontrol.c
+++ b/usr.sbin/fwcontrol/fwcontrol.c
@@ -207,7 +207,7 @@
struct fw_asyreq *asyreq;
u_int32_t *qld, res;
- asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16);
+ asyreq = malloc(sizeof(*asyreq));
if (asyreq == NULL)
err(EX_SOFTWARE, "%s:asyreq malloc", __func__);
asyreq->req.len = 16;
@@ -262,7 +262,7 @@
{
struct fw_asyreq *asyreq;
- asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12);
+ asyreq = malloc(sizeof(*asyreq));
if (asyreq == NULL)
err(EX_SOFTWARE, "%s:asyreq malloc", __func__);
asyreq->req.len = 12;
@@ -289,7 +289,7 @@
{
struct fw_asyreq *asyreq;
- asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 12);
+ asyreq = malloc(sizeof(*asyreq));
if (asyreq == NULL)
err(EX_SOFTWARE, "%s:asyreq malloc", __func__);
asyreq->req.len = 12;
@@ -308,7 +308,7 @@
{
struct fw_asyreq *asyreq;
- asyreq = (struct fw_asyreq *)malloc(sizeof(struct fw_asyreq_t) + 16);
+ asyreq = malloc(sizeof(*asyreq));
if (asyreq == NULL)
err(EX_SOFTWARE, "%s:asyreq malloc", __func__);
asyreq->req.len = 16;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 11:05 AM (13 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15741980
Default Alt Text
D46014.diff (1 KB)
Attached To
Mode
D46014: fwcontrol: Allocate full fw_asyreq structures passed to the kernel
Attached
Detach File
Event Timeline
Log In to Comment