fix: some invalid read
This commit is contained in:
parent
d7e895448d
commit
091e7a625b
|
@ -1135,6 +1135,7 @@ int32_t colInfoDataEnsureCapacity(SColumnInfoData* pColumn, size_t existRows, ui
|
||||||
|
|
||||||
assert(pColumn->info.bytes);
|
assert(pColumn->info.bytes);
|
||||||
tmp = taosMemoryRealloc(pColumn->pData, numOfRows * pColumn->info.bytes);
|
tmp = taosMemoryRealloc(pColumn->pData, numOfRows * pColumn->info.bytes);
|
||||||
|
memset(tmp, 0, numOfRows * pColumn->info.bytes);
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1311,6 +1311,7 @@ int32_t qwProcessHb(SQWorker *mgmt, SQWMsg *qwMsg, SSchedulerHbReq *req) {
|
||||||
|
|
||||||
if (sch->hbConnInfo.handle) {
|
if (sch->hbConnInfo.handle) {
|
||||||
tmsgReleaseHandle(&sch->hbConnInfo, TAOS_CONN_SERVER);
|
tmsgReleaseHandle(&sch->hbConnInfo, TAOS_CONN_SERVER);
|
||||||
|
sch->hbConnInfo.handle = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&sch->hbConnInfo, &qwMsg->connInfo, sizeof(qwMsg->connInfo));
|
memcpy(&sch->hbConnInfo, &qwMsg->connInfo, sizeof(qwMsg->connInfo));
|
||||||
|
@ -1331,6 +1332,7 @@ _return:
|
||||||
|
|
||||||
if (code) {
|
if (code) {
|
||||||
tmsgReleaseHandle(&qwMsg->connInfo, TAOS_CONN_SERVER);
|
tmsgReleaseHandle(&qwMsg->connInfo, TAOS_CONN_SERVER);
|
||||||
|
qwMsg->connInfo.handle = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
QW_DLOG("hb rsp send, handle:%p, code:%x - %s", qwMsg->connInfo.handle, code, tstrerror(code));
|
QW_DLOG("hb rsp send, handle:%p, code:%x - %s", qwMsg->connInfo.handle, code, tstrerror(code));
|
||||||
|
|
Loading…
Reference in New Issue