重构key keeper创建keyring的代码。修复除 #97 外的valgrind definitely lost。

This commit is contained in:
zhengchao
2018-11-29 19:02:07 +08:00
parent cc5420d158
commit a5ca97d91e
5 changed files with 36 additions and 103 deletions

View File

@@ -886,7 +886,6 @@ static void cache_query_obj_on_succ(future_result_t * result, void * user)
//last call.
ATOMIC_DEC(&(ctx->ref_handle->stat_val[STAT_CACHE_READING]));
promise_dettach_ctx(p);
promise_finish(p);
last_call=1;
break;
case RESULT_TYPE_BODY:
@@ -896,8 +895,11 @@ static void cache_query_obj_on_succ(future_result_t * result, void * user)
break;
}
promise_success(p, ctx);
if(last_call) cache_query_ctx_free_cb(ctx);
if(last_call)
{
cache_query_ctx_free_cb(ctx);
promise_finish(p);
}
return;
}
static void cache_query_obj_on_fail(enum e_future_error err, const char * what, void * user)