File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ namespace cppipc {
20
20
21
21
void call_message::clear () {
22
22
if (!zmqbodyused) {
23
- if (! body) free ((void *)body);
23
+ if (body) free ((void *)body);
24
24
}
25
25
body = NULL ;
26
26
objectid = 0 ;
@@ -77,16 +77,14 @@ void call_message::emit(nanosockets::zmq_msg_vector& msg) {
77
77
z_body->assign (body, bodylen);
78
78
}
79
79
80
- // we are giving away the body pointer
81
- body = NULL ;
82
80
clear ();
83
81
}
84
82
85
83
86
84
87
85
void reply_message::clear () {
88
86
if (!zmqbodyused) {
89
- if (! body) free ((void *)body);
87
+ if (body) free ((void *)body);
90
88
}
91
89
body = NULL ;
92
90
bodylen = 0 ;
@@ -137,8 +135,6 @@ void reply_message::emit(nanosockets::zmq_msg_vector& msg) {
137
135
z_body->assign (body, bodylen);
138
136
}
139
137
140
- // we are giving away the body pointer
141
- body = NULL ;
142
138
clear ();
143
139
}
144
140
You can’t perform that action at this time.
0 commit comments