rm invalid read
This commit is contained in:
parent
20e74e57d9
commit
e7014c3e89
|
@ -43,7 +43,7 @@ void* rpcOpen(const SRpcInit* pInit) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (pInit->label) {
|
if (pInit->label) {
|
||||||
tstrncpy(pRpc->label, pInit->label, TSDB_LABEL_LEN);
|
tstrncpy(pRpc->label, pInit->label, sizeof(pRpc->label));
|
||||||
}
|
}
|
||||||
|
|
||||||
pRpc->compressSize = pInit->compressSize;
|
pRpc->compressSize = pInit->compressSize;
|
||||||
|
@ -79,7 +79,7 @@ void* rpcOpen(const SRpcInit* pInit) {
|
||||||
}
|
}
|
||||||
pRpc->parent = pInit->parent;
|
pRpc->parent = pInit->parent;
|
||||||
if (pInit->user) {
|
if (pInit->user) {
|
||||||
memcpy(pRpc->user, pInit->user, strlen(pInit->user));
|
tstrncpy(pRpc->user, pInit->user, sizeof(pRpc->user));
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t refId = transAddExHandle(transGetInstMgt(), pRpc);
|
int64_t refId = transAddExHandle(transGetInstMgt(), pRpc);
|
||||||
|
@ -91,7 +91,7 @@ void rpcClose(void* arg) {
|
||||||
tInfo("start to close rpc");
|
tInfo("start to close rpc");
|
||||||
transRemoveExHandle(transGetInstMgt(), (int64_t)arg);
|
transRemoveExHandle(transGetInstMgt(), (int64_t)arg);
|
||||||
transReleaseExHandle(transGetInstMgt(), (int64_t)arg);
|
transReleaseExHandle(transGetInstMgt(), (int64_t)arg);
|
||||||
tInfo("rpc is closed");
|
tInfo("end to close rpc");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
void rpcCloseImpl(void* arg) {
|
void rpcCloseImpl(void* arg) {
|
||||||
|
|
Loading…
Reference in New Issue