-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
首先感谢作者开源了这么好的一个库,使用过程中发现好像有个内存泄漏的地方.麻烦看看
https://github.com/ithewei/libhv/blob/master/ssl/wintls.c#L160
hCred = (CredHandle*)malloc(sizeof(CredHandle));
if (hCred == NULL) {
return NULL;
}
这里malloc了一个CredHandle* hCred 在 hssl_ctx_free 中好像没有free
https://github.com/ithewei/libhv/blob/master/ssl/wintls.c#L183
void hssl_ctx_free(hssl_ctx_t ssl_ctx)
{
SECURITY_STATUS sec_status = FreeCredentialsHandle(ssl_ctx);
if (sec_status != SEC_E_OK) {
printe("free_cred_handle FreeCredentialsHandle %d\n", sec_status);
}
}
这应该会导致内存泄漏吧
Reactions are currently unavailable