Verified Commit 7b771375 authored by Grigorii Demidov's avatar Grigorii Demidov Committed by Vladimír Čunát

daemon/worker: fix memory leaks

parent ab4816f2
......@@ -307,6 +307,8 @@ int session_set_handle(struct session *session, uv_handle_t *h)
return kr_error(EINVAL);
}
assert(session->handle == NULL);
if (h->type == UV_TCP) {
uint8_t *wire_buf = malloc(KNOT_WIRE_MAX_PKTSIZE);
if (!wire_buf) {
......
......@@ -1005,7 +1005,6 @@ static void on_connect(uv_connect_t *req, int status)
}
session_set_connected(session, true);
session_set_handle(session,(uv_handle_t *)handle);
int ret = kr_ok();
if (session_has_tls(session)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment