summaryrefslogtreecommitdiff
path: root/src/command.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-02-12 20:49:00 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-02-12 20:49:00 +0100
commit2e78e48503375a415d95ee8df80df9c065172abc (patch)
treef3a3dd6dfd4457f3446435bea3c0a850da701926 /src/command.cpp
parentd8430f4b9a43bf8c99854298edc9f1bc35c0e8ec (diff)
Multi-hop REQ/REP, part V., peer identity is passed from init object to session
Diffstat (limited to 'src/command.cpp')
-rw-r--r--src/command.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/command.cpp b/src/command.cpp
index fcb5729..7564fe2 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -17,8 +17,18 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <stdlib.h>
+
#include "command.hpp"
void zmq::deallocate_command (command_t *cmd_)
{
+ switch (cmd_->type) {
+ case command_t::attach:
+ if (cmd_->args.attach.peer_identity)
+ free (cmd_->args.attach.peer_identity);
+ break;
+ default:
+ /* noop */;
+ }
}