fix(tsc): fix invalid free

This commit is contained in:
yihaoDeng 2022-09-30 20:02:51 +08:00
parent 4a3436b15c
commit ca041b6dd0
1 changed files with 2 additions and 2 deletions

View File

@ -952,10 +952,10 @@ void* transInitServer(uint32_t ip, uint32_t port, char* label, int numOfThreads,
#ifdef WINDOWS #ifdef WINDOWS
char pipeName[64]; char pipeName[64];
snprintf(pipeName, sizeof(pipeName), "\\\\?\\pipe\\trans.rpc.%p-%" PRIu64, taosSafeRand(), GetCurrentProcessId()); snprintf(pipeName, sizeof(pipeName), "\\\\?\\pipe\\trans.rpc.%d-%" PRIu64, taosSafeRand(), GetCurrentProcessId());
#else #else
char pipeName[PATH_MAX] = {0}; char pipeName[PATH_MAX] = {0};
snprintf(pipeName, sizeof(pipeName), "%s%spipe.trans.rpc.%08X-%" PRIu64, tsTempDir, TD_DIRSEP, taosSafeRand(), snprintf(pipeName, sizeof(pipeName), "%s%spipe.trans.rpc.%08d-%" PRIu64, tsTempDir, TD_DIRSEP, taosSafeRand(),
taosGetSelfPthreadId()); taosGetSelfPthreadId());
#endif #endif
ret = uv_pipe_bind(&srv->pipeListen, pipeName); ret = uv_pipe_bind(&srv->pipeListen, pipeName);