Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163326888
D48478.id149322.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
743 B
Referenced Files
None
Subscribers
None
D48478.id149322.diff
View Options
diff --git a/usr.bin/genl/genl.c b/usr.bin/genl/genl.c
--- a/usr.bin/genl/genl.c
+++ b/usr.bin/genl/genl.c
@@ -306,11 +306,11 @@
if (!snl_init(&ss, NETLINK_GENERIC))
err(EXIT_FAILURE, "snl_init()");
- snl_init_writer(&ss, &nw);
- hdr = snl_create_genl_msg_request(&nw, GENL_ID_CTRL,
- CTRL_CMD_GETFAMILY);
- if ((hdr = snl_finalize_msg(&nw)) == NULL)
- err(EXIT_FAILURE, "snl_finalize_msg");
+ if (!snl_init_writer(&ss, &nw))
+ err(EXIT_FAILURE, "snl_init_writer");
+ if (!snl_create_genl_msg_request(&nw, GENL_ID_CTRL, CTRL_CMD_GETFAMILY))
+ err(EXIT_FAILURE, "snl_create_genl_msg_request");
+ hdr = snl_finalize_msg(&nw);
seq_id = hdr->nlmsg_seq;
if (!snl_send_message(&ss, hdr))
err(EXIT_FAILURE, "snl_send_message");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 23, 3:48 AM (3 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35390709
Default Alt Text
D48478.id149322.diff (743 B)
Attached To
Mode
D48478: genl: properly handle possible failures by snl(3) library
Attached
Detach File
Event Timeline
Log In to Comment