summaryrefslogtreecommitdiff
path: root/server/SockDiag.cpp
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2017-02-14 17:09:09 +0900
committerLorenzo Colitti <lorenzo@google.com>2017-02-14 17:32:34 +0900
commitbbcd81d2e5103bbf465d69c6d0f958d3e740dd6e (patch)
tree56fc6e5092224e7e579b28fc37525eeb5881083d /server/SockDiag.cpp
parent219f328b7c2f99ef27f89206bdbf1260fa7ad2e4 (diff)
downloadnetd-bbcd81d2e5103bbf465d69c6d0f958d3e740dd6e.tar.gz
Don't call NetlinkCallbacks with nullptr on NLMSG_DONE.
No real callback uses this, and even the test code doesn't seem to use it for anything useful. Bug: 34873832 Test: bullhead builds, boots, rules flushed on netd restart Test: netd_{unit,integration}_test pass Change-Id: I195dd388864e9e596af9f4d08aee7b8ade078fb5
Diffstat (limited to 'server/SockDiag.cpp')
-rw-r--r--server/SockDiag.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/server/SockDiag.cpp b/server/SockDiag.cpp
index edb046c4..99e5bac1 100644
--- a/server/SockDiag.cpp
+++ b/server/SockDiag.cpp
@@ -205,7 +205,6 @@ int SockDiag::sendDumpRequest(uint8_t proto, uint8_t family, const char *addrstr
int SockDiag::readDiagMsg(uint8_t proto, const SockDiag::DestroyFilter& shouldDestroy) {
NetlinkDumpCallback callback = [this, proto, shouldDestroy] (nlmsghdr *nlh) {
- if (nlh == nullptr) return;
const inet_diag_msg *msg = reinterpret_cast<inet_diag_msg *>(NLMSG_DATA(nlh));
if (shouldDestroy(proto, msg)) {
sockDestroy(proto, msg);