提交 c996837f 编写于 作者: H Haojun Liao

refactor: do some internal refactor.

上级 cefe4be1
...@@ -33,7 +33,7 @@ SArray* taosArrayInit(size_t size, size_t elemSize) { ...@@ -33,7 +33,7 @@ SArray* taosArrayInit(size_t size, size_t elemSize) {
} }
pArray->size = 0; pArray->size = 0;
pArray->pData = taosMemoryMalloc(size * elemSize); pArray->pData = taosMemoryCalloc(size, elemSize);
if (pArray->pData == NULL) { if (pArray->pData == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY; terrno = TSDB_CODE_OUT_OF_MEMORY;
taosMemoryFree(pArray); taosMemoryFree(pArray);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册