fix: fix core dump caused by NULL TAOS_RES when the sync query call back function syncQueryFn is executed

This commit is contained in:
shenglian zhou 2022-07-19 15:52:46 +08:00
parent 9381411b74
commit e56378b7fd
1 changed files with 3 additions and 2 deletions

View File

@ -2101,8 +2101,9 @@ TAOS_RES* taosQueryImpl(TAOS* taos, const char* sql, bool validateOnly) {
taosAsyncQueryImpl(*(int64_t*)taos, sql, syncQueryFn, param, validateOnly);
tsem_wait(&param->sem);
param->pRequest->syncQuery = true;
if (param->pRequest != NULL) {
param->pRequest->syncQuery = true;
}
return param->pRequest;
#else
size_t sqlLen = strlen(sql);