[zeromq-dev] [PATCH]
Daniel Sentenac
sentenac at ego-gw.it
Thu Oct 7 15:52:18 CEST 2010
In attachment the patch proposed for resolving memory leak in PUB sockets:
From 34bad5b47805ad0d2704caeac661c03468f66013 Mon Sep 17 00:00:00 2001
From: Daniel Sentenac <daniel.sentenac at ego-gw.it>
Date: Thu, 7 Oct 2010 15:47:35 +0200
Subject: [PATCH] fixed memory leak bug
Signed-off-by: Daniel Sentenac <daniel.sentenac at ego-gw.it>
---
src/pub.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/pub.cpp b/src/pub.cpp
index b1a1239..471c8ed 100644
--- a/src/pub.cpp
+++ b/src/pub.cpp
@@ -140,7 +140,7 @@ int zmq::pub_t::xsend (zmq_msg_t *msg_, int flags_)
// Push the message to all destinations.
for (pipes_t::size_type i = 0; i < active;) {
if (!write (pipes [i], msg_))
- content->refcnt.sub (1);
+ zmq_msg_close(msg_);
else
i++;
}
--
1.6.0.3
Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fixed-memory-leak-bug.patch
Type: text/x-patch
Size: 775 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101007/5c6de07a/attachment.bin>
More information about the zeromq-dev
mailing list