return after free

This commit is contained in:
Jeff Tao 2020-04-08 21:37:39 +08:00
parent 7b34220674
commit 4f945ec62a
1 changed files with 1 additions and 0 deletions

View File

@ -331,6 +331,7 @@ void *rpcReallocCont(void *ptr, int contLen) {
char *start = ((char *)ptr) - sizeof(SRpcReqContext) - sizeof(SRpcHead);
if (contLen == 0 ) {
free(start);
return NULL;
}
int size = contLen + RPC_MSG_OVERHEAD;