提交 4f945ec6 编写于 作者: J Jeff Tao

return after free

上级 7b342206
...@@ -331,6 +331,7 @@ void *rpcReallocCont(void *ptr, int contLen) { ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册