提交 626cd4cc 编写于 作者: H Haojun Liao

[td-255] merge develop.

上级 f86ab16b
...@@ -3618,6 +3618,7 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, __async_cb_func_t ...@@ -3618,6 +3618,7 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, __async_cb_func_t
pNew->pTscObj = pSql->pTscObj; pNew->pTscObj = pSql->pTscObj;
pNew->signature = pNew; pNew->signature = pNew;
pNew->sqlstr = strdup(pSql->sqlstr);
tsem_init(&pNew->rspSem, 0, 0); tsem_init(&pNew->rspSem, 0, 0);
SSqlCmd* pnCmd = &pNew->cmd; SSqlCmd* pnCmd = &pNew->cmd;
......
...@@ -24,11 +24,12 @@ void* taosArrayInit(size_t size, size_t elemSize) { ...@@ -24,11 +24,12 @@ void* taosArrayInit(size_t size, size_t elemSize) {
size = TARRAY_MIN_SIZE; size = TARRAY_MIN_SIZE;
} }
SArray* pArray = calloc(1, sizeof(SArray)); SArray* pArray = malloc(sizeof(SArray));
if (pArray == NULL) { if (pArray == NULL) {
return NULL; return NULL;
} }
pArray->size = 0;
pArray->pData = calloc(size, elemSize); pArray->pData = calloc(size, elemSize);
if (pArray->pData == NULL) { if (pArray->pData == NULL) {
free(pArray); free(pArray);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册