mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 17:15:00 +02:00
wprobe: fix missing return code check
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19483 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
67621995eb
commit
30cb23c92d
@ -560,7 +560,9 @@ wprobe_msg_to_network(int socket, struct nl_msg *msg)
|
||||
mhdr.status = WPROBE_MSG_DATA;
|
||||
mhdr.len = buflen;
|
||||
wprobe_swap_msg_hdr(&mhdr);
|
||||
write(socket, &mhdr, sizeof(mhdr));
|
||||
ret = write(socket, &mhdr, sizeof(mhdr));
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
memcpy(buf, nlh, buflen);
|
||||
nlh = buf;
|
||||
@ -572,6 +574,8 @@ wprobe_msg_to_network(int socket, struct nl_msg *msg)
|
||||
swap_genlmsghdr(gnlh);
|
||||
swap_nlmsghdr(nlh);
|
||||
ret = write(socket, buf, buflen);
|
||||
|
||||
out:
|
||||
free(buf);
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user