diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index b7459b00dace1b3ba44482742e11f1f3d99b4da1..3e2c2318890671c056b46d9dfce181fec1312e82 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -2953,6 +2953,12 @@ int tscProcessQueryRsp(SSqlObj *pSql) { SSqlRes *pRes = &pSql->res; SQueryTableRsp *pQueryAttr = (SQueryTableRsp *)pRes->pRsp; + + if (pQueryAttr == NULL) { + pRes->code = TSDB_CODE_TSC_OUT_OF_MEMORY; + return pRes->code; + } + pQueryAttr->qId = htobe64(pQueryAttr->qId); pRes->qId = pQueryAttr->qId;