fix memory leak, see Issue #290

This commit is contained in:
Cloud Wu
2015-06-07 12:38:55 +08:00
parent 55d0d57d5c
commit ac093c7142

View File

@@ -365,6 +365,7 @@ dispatch_name_queue(struct harbor *h, struct keyvalue * node) {
while ((m = pop_queue(queue)) != NULL) {
m->header.destination |= (handle & HANDLE_MASK);
send_remote(context, fd, m->buffer, m->size, &m->header);
skynet_free(m->buffer);
}
}
@@ -381,6 +382,7 @@ dispatch_queue(struct harbor *h, int id) {
struct harbor_msg * m;
while ((m = pop_queue(queue)) != NULL) {
send_remote(h->ctx, fd, m->buffer, m->size, &m->header);
skynet_free(m->buffer);
}
release_queue(queue);
s->queue = NULL;