summaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 1700ca9f..2e95c229 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -53,7 +53,9 @@ nni_reaper(void *arg)
nni_mutex_exit(&sock->s_mx);
// This should already have been done.
- pipe->p_ops.p_close(pipe->p_trandata);
+ if (pipe->p_trandata != NULL) {
+ pipe->p_ops.p_close(pipe->p_trandata);
+ }
// Remove the pipe from the protocol. Protocols may
// keep lists of pipes for managing their topologies.