!63 【轻量级 PR】:修复pthread_key_create core问题

Merge pull request !63 from yewk/N/A
This commit is contained in:
opengauss-bot 2022-11-08 11:43:37 +00:00 committed by Gitee
commit a707be0317
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -104,14 +104,9 @@ typedef struct ErrBufCtx_ {
static pthread_key_t g_key;
static pthread_once_t g_keyOnce = PTHREAD_ONCE_INIT;
void KeyDestructor(void *errCtx)
{
free(errCtx);
}
void MakeKey(void)
{
(void)pthread_key_create(&g_key, KeyDestructor);
(void)pthread_key_create(&g_key, free);
}
static ErrBufCtx *GetErrBufCtx()