diff --git a/common/src/tfe_future.cpp b/common/src/tfe_future.cpp index 51a7318..1a15624 100644 --- a/common/src/tfe_future.cpp +++ b/common/src/tfe_future.cpp @@ -156,7 +156,7 @@ void future_destroy(struct future * f) struct promise * p = future_to_promise(f); if (p->cb_ctx_destroy != NULL) { - p->cb_ctx_destroy(p); + p->cb_ctx_destroy(p->ctx); } FS_operate(g_FP_instance.fs_handle,g_FP_instance.fsid_f_num, 0, FS_OP_SUB, 1); memset(p, 0, sizeof(struct promise)); diff --git a/platform/src/ssl_stream.cpp b/platform/src/ssl_stream.cpp index 986e0af..6e81a55 100644 --- a/platform/src/ssl_stream.cpp +++ b/platform/src/ssl_stream.cpp @@ -234,14 +234,12 @@ void ssl_free_chello(struct ssl_chello * p) struct ssl_stream * ssl_stream_new(struct ssl_mgr * mgr, evutil_socket_t fd, enum tfe_conn_dir dir, struct ssl_chello * client_hello, struct keyring * kyr) { - struct sockaddr addr; - socklen_t addrlen; + int ret = 0; struct ssl_stream * s_stream = ALLOC(struct ssl_stream, 1); s_stream->dir = dir; s_stream->mgr = mgr; s_stream->_do_not_use.fd = fd; - ret = getpeername(fd, &addr, &addrlen); assert(ret == 0); switch (dir) {