diff --git a/cache/src/tango_cache_pending.cpp b/cache/src/tango_cache_pending.cpp index ab9b69b..9434bbe 100644 --- a/cache/src/tango_cache_pending.cpp +++ b/cache/src/tango_cache_pending.cpp @@ -150,6 +150,7 @@ time_t read_GMT_time(const char* gmt_string) { time_t expire_rel_time; struct tm expire_gmt_time; + memset(&expire_gmt_time, 0, sizeof(expire_gmt_time)); strptime(gmt_string, "%a, %d %b %Y %H:%M:%S GMT", &expire_gmt_time); expire_rel_time = mktime(&expire_gmt_time); return expire_rel_time; diff --git a/platform/src/ssl_stream.cpp b/platform/src/ssl_stream.cpp index 62e271a..33b18ee 100644 --- a/platform/src/ssl_stream.cpp +++ b/platform/src/ssl_stream.cpp @@ -715,8 +715,8 @@ static void ssl_async_peek_client_hello(struct future * future, evutil_socket_t struct peek_client_hello_ctx * ctx = ALLOC(struct peek_client_hello_ctx, 1); ctx->ev = event_new(evbase, fd, EV_READ, peek_client_hello_cb, p); ctx->logger = logger; - event_add(ctx->ev, NULL); promise_set_ctx(p, (void *) ctx, peek_client_hello_ctx_free_cb); + event_add(ctx->ev, NULL); return; }