fix(analytics): check the null ptr.
This commit is contained in:
parent
e103d3963b
commit
91ce69e6af
|
@ -374,7 +374,7 @@ static int32_t forecastNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
|
|||
SForecastOperatorInfo* pInfo = pOperator->info;
|
||||
SSDataBlock* pResBlock = pInfo->pRes;
|
||||
SForecastSupp* pSupp = &pInfo->forecastSupp;
|
||||
SAnalyticBuf* pBuf = &pSupp->analBuf;
|
||||
SAnalyticBuf* pBuf = &pSupp->analBuf;
|
||||
int64_t st = taosGetTimestampUs();
|
||||
int32_t numOfBlocks = pSupp->numOfBlocks;
|
||||
const char* pId = GET_TASKID(pOperator->pTaskInfo);
|
||||
|
|
|
@ -148,7 +148,13 @@ bool taosAnalGetOptStr(const char *option, const char *optName, char *optValue,
|
|||
tstrncpy(buf, pStart, len);
|
||||
}
|
||||
|
||||
char *pRight = strstr(buf, "=") + 1;
|
||||
char *pRight = strstr(buf, "=");
|
||||
if (pRight == NULL) {
|
||||
return false;
|
||||
} else {
|
||||
pRight += 1;
|
||||
}
|
||||
|
||||
strtrim(pRight);
|
||||
|
||||
int32_t vLen = MIN(optMaxLen, strlen(pRight) + 1);
|
||||
|
|
|
@ -363,7 +363,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_ANODE_TOO_MANY_ALGO_TYPE, "Anode too many algori
|
|||
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_ANA_URL_RSP_IS_NULL, "Analysis service response is NULL")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_ANA_URL_CANT_ACCESS, "Analysis service can't access")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_ANA_ALGO_NOT_FOUND, "Analysis algorithm not found")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_ANA_ALGO_NOT_FOUND, "Analysis algorithm is missing")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_ANA_ALGO_NOT_LOAD, "Analysis algorithm not loaded")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_ANA_BUF_INVALID_TYPE, "Analysis invalid buffer type")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_ANA_ANODE_RETURN_ERROR, "Analysis failed since anode return error")
|
||||
|
|
Loading…
Reference in New Issue