summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/socket_wrapper.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index b336514..ac1ea03 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -2050,9 +2050,11 @@ static int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
SWRAP_DLIST_ADD(sockets, child_si);
- swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_SEND, NULL, 0);
- swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_RECV, NULL, 0);
- swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_ACK, NULL, 0);
+ if (addr != NULL) {
+ swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_SEND, NULL, 0);
+ swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_RECV, NULL, 0);
+ swrap_dump_packet(child_si, addr, SWRAP_ACCEPT_ACK, NULL, 0);
+ }
return fd;
}