Hello,
I am using libuv-0.10.27
test/echo-server.c
static void after_write(uv_write_t* req, int status) {
write_req_t* wr;
uv_err_t err;
/* Free the read/write buffer and the request */
wr = (write_req_t*) req;
free(wr->buf.base);
free(wr);
if (status == 0)
return;
err = uv_last_error(loop);
fprintf(stderr, "uv_write error: %s\n", uv_strerror(err));
if (err.code == UV_ECANCELED)
return;
ASSERT(err.code == UV_EPIPE);
uv_close((uv_handle_t*)req->handle, on_close);
}
Should not we take handle ptr before free(wr) ?
--
You received this message because you are subscribed to the Google Groups
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.