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 {
2020
2121void call_message::clear () {
2222 if (!zmqbodyused) {
23- if (! body) free ((void *)body);
23+ if (body) free ((void *)body);
2424 }
2525 body = NULL ;
2626 objectid = 0 ;
@@ -77,16 +77,14 @@ void call_message::emit(nanosockets::zmq_msg_vector& msg) {
7777 z_body->assign (body, bodylen);
7878 }
7979
80- // we are giving away the body pointer
81- body = NULL ;
8280 clear ();
8381}
8482
8583
8684
8785void reply_message::clear () {
8886 if (!zmqbodyused) {
89- if (! body) free ((void *)body);
87+ if (body) free ((void *)body);
9088 }
9189 body = NULL ;
9290 bodylen = 0 ;
@@ -137,8 +135,6 @@ void reply_message::emit(nanosockets::zmq_msg_vector& msg) {
137135 z_body->assign (body, bodylen);
138136 }
139137
140- // we are giving away the body pointer
141- body = NULL ;
142138 clear ();
143139}
144140
You can’t perform that action at this time.
0 commit comments