Merge pull request #5004 from taosdata/hotfix/fix_calloc_failed

fix bug when calloc failed
This commit is contained in:
haojun Liao 2021-01-22 22:40:15 +08:00 committed by GitHub
commit 3401452f36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -110,6 +110,7 @@ static SSqlObj *taosConnectImpl(const char *ip, const char *user, const char *pa
rpcClose(pDnodeConn); rpcClose(pDnodeConn);
free(pObj->tscCorMgmtEpSet); free(pObj->tscCorMgmtEpSet);
free(pObj); free(pObj);
return NULL;
} }
memcpy(pObj->tscCorMgmtEpSet, &corMgmtEpSet, sizeof(SRpcCorEpSet)); memcpy(pObj->tscCorMgmtEpSet, &corMgmtEpSet, sizeof(SRpcCorEpSet));