Merge pull request #1562 from taosdata/hotfix/rpcrealloc
return after free
This commit is contained in:
commit
99e0873a41
|
@ -331,6 +331,7 @@ void *rpcReallocCont(void *ptr, int contLen) {
|
||||||
char *start = ((char *)ptr) - sizeof(SRpcReqContext) - sizeof(SRpcHead);
|
char *start = ((char *)ptr) - sizeof(SRpcReqContext) - sizeof(SRpcHead);
|
||||||
if (contLen == 0 ) {
|
if (contLen == 0 ) {
|
||||||
free(start);
|
free(start);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int size = contLen + RPC_MSG_OVERHEAD;
|
int size = contLen + RPC_MSG_OVERHEAD;
|
||||||
|
|
Loading…
Reference in New Issue