提交 ed182b45 编写于 作者: L liu0x54

[TD-162]add return value judgement to avoid NULL pointer access

上级 66802544
......@@ -321,6 +321,9 @@ TAOS_FIELD *taos_fetch_fields(TAOS_RES *res) {
if (pSql == NULL || pSql->signature != pSql) return 0;
SQueryInfo *pQueryInfo = tscGetQueryInfoDetail(&pSql->cmd, 0);
if(NULL == pQueryInfo) {
return NULL;
}
return pQueryInfo->fieldsInfo.pFields;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册