fix: double decompress issue and memory leak issue
This commit is contained in:
parent
3ca5559b37
commit
198be9a7a6
|
@ -97,7 +97,8 @@ static int32_t hbProcessDBInfoRsp(void *value, int32_t valueLen, struct SCatalog
|
|||
SDbHbBatchRsp batchRsp = {0};
|
||||
if (tDeserializeSDbHbBatchRsp(value, valueLen, &batchRsp) != 0) {
|
||||
terrno = TSDB_CODE_INVALID_MSG;
|
||||
return -1;
|
||||
code = terrno;
|
||||
goto _return;
|
||||
}
|
||||
|
||||
int32_t numOfBatchs = taosArrayGetSize(batchRsp.pArray);
|
||||
|
|
|
@ -236,6 +236,7 @@ void ctgFreeTbCache(SCtgDBCache* dbCache) {
|
|||
}
|
||||
|
||||
void ctgFreeVgInfoCache(SCtgDBCache* dbCache) { freeVgInfo(dbCache->vgCache.vgInfo); }
|
||||
void ctgFreeCfgInfoCache(SCtgDBCache* dbCache) { freeDbCfgInfo(dbCache->cfgCache.cfgInfo); }
|
||||
|
||||
void ctgFreeDbCache(SCtgDBCache* dbCache) {
|
||||
if (NULL == dbCache) {
|
||||
|
@ -243,6 +244,7 @@ void ctgFreeDbCache(SCtgDBCache* dbCache) {
|
|||
}
|
||||
|
||||
ctgFreeVgInfoCache(dbCache);
|
||||
ctgFreeCfgInfoCache(dbCache);
|
||||
ctgFreeStbMetaCache(dbCache);
|
||||
ctgFreeTbCache(dbCache);
|
||||
}
|
||||
|
|
|
@ -916,7 +916,7 @@ FORCE_INLINE uint64_t decodeDoubleValue(const char *const input, int32_t *const
|
|||
uint64_t diff = 0ul;
|
||||
int32_t nbytes = (flag & 0x7) + 1;
|
||||
for (int32_t i = 0; i < nbytes; i++) {
|
||||
diff |= (((uint64_t)0xffff & input[(*ipos)++]) << BITS_PER_BYTE * i);
|
||||
diff |= (((uint64_t)0xff & input[(*ipos)++]) << BITS_PER_BYTE * i);
|
||||
}
|
||||
int32_t shift_width = (LONG_BYTES * BITS_PER_BYTE - nbytes * BITS_PER_BYTE) * (flag >> 3);
|
||||
diff <<= shift_width;
|
||||
|
|
Loading…
Reference in New Issue