fix(query): fix memory leak.
This commit is contained in:
parent
a28156e832
commit
e1be7dd399
|
@ -618,6 +618,7 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
|
|||
|
||||
// set the update type
|
||||
pConsumerNew->updateType = CONSUMER_UPDATE__MODIFY;
|
||||
taosArrayDestroy(pConsumerNew->assignedTopics);
|
||||
pConsumerNew->assignedTopics = taosArrayDup(pTopicList, topicNameDup);
|
||||
|
||||
// all subscribed topics should re-balance.
|
||||
|
@ -647,6 +648,7 @@ int32_t mndProcessSubscribeReq(SRpcMsg *pMsg) {
|
|||
|
||||
// set the update type
|
||||
pConsumerNew->updateType = CONSUMER_UPDATE__MODIFY;
|
||||
taosArrayDestroy(pConsumerNew->assignedTopics);
|
||||
pConsumerNew->assignedTopics = taosArrayDup(pTopicList, topicNameDup);
|
||||
|
||||
int32_t oldTopicNum = (pExistedConsumer->currentTopics)? taosArrayGetSize(pExistedConsumer->currentTopics):0;
|
||||
|
|
|
@ -50,11 +50,6 @@ uint32_t taosDJB2Hash(const char *key, uint32_t len) {
|
|||
return hash;
|
||||
}
|
||||
|
||||
uint32_t xxHash(const char *key, uint32_t len) {
|
||||
int32_t seed = 0xcc9e2d51;
|
||||
return XXH32(key, len, seed);
|
||||
}
|
||||
|
||||
uint32_t MurmurHash3_32(const char *key, uint32_t len) {
|
||||
const uint8_t *data = (const uint8_t *)key;
|
||||
const int32_t nblocks = len >> 2u;
|
||||
|
|
Loading…
Reference in New Issue