Skip to content

Commit 1bfb3ad

Browse files
authored
Merge pull request #130 from a4z/movector
Problem: uninitialized context pointer in socket_t move constructor
2 parents 37275e7 + d88414e commit 1bfb3ad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

zmq.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,9 +506,12 @@ namespace zmq
506506
#endif
507507

508508
#ifdef ZMQ_HAS_RVALUE_REFS
509-
inline socket_t(socket_t&& rhs) ZMQ_NOTHROW : ptr(rhs.ptr)
509+
inline socket_t(socket_t&& rhs) ZMQ_NOTHROW :
510+
ptr(rhs.ptr),
511+
ctxptr(rhs.ctxptr)
510512
{
511-
rhs.ptr = NULL;
513+
rhs.ptr = NULL;
514+
rhs.ctxptr = NULL;
512515
}
513516
inline socket_t& operator=(socket_t&& rhs) ZMQ_NOTHROW
514517
{

0 commit comments

Comments
 (0)