dmlc / ps-lite

A lightweight parameter server interface

Home Page:http://ps-lite.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

potential memory error caused by unsuitable zmq_msg_* functions

microwish opened this issue · comments

zmq_van.h, RecvMsg function;

190 } else if (i == 1) {
191 // task
192 UnpackMeta(buf, size, &(msg->meta));
193 zmq_msg_close(zmsg);
194 bool more = zmq_msg_more(zmsg);
195 delete zmsg;
196 if (!more) break;
197 } else {

Seems we should call line 194 first and then call line 193.