summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ctx.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp
index 22c4908..21dec58 100644
--- a/src/ctx.cpp
+++ b/src/ctx.cpp
@@ -327,16 +327,16 @@ xs::endpoint_t xs::ctx_t::find_endpoint (const char *addr_)
endpoint_t empty = {NULL, options_t()};
return empty;
}
- endpoint_t *endpoint = &it->second;
+ endpoint_t endpoint = it->second;
// Increment the command sequence number of the peer so that it won't
// get deallocated until "bind" command is issued by the caller.
// The subsequent 'bind' has to be called with inc_seqnum parameter
// set to false, so that the seqnum isn't incremented twice.
- endpoint->socket->inc_seqnum ();
+ endpoint.socket->inc_seqnum ();
endpoints_sync.unlock ();
- return *endpoint;
+ return endpoint;
}
// The last used socket ID, or 0 if no socket was used so far. Note that this