diff --git a/samgr_endpoint/source/default_client_rpc.c b/samgr_endpoint/source/default_client_rpc.c index a245f2eef2f5295b3112c28f72fc335054523fa6..ce5a2cb824fd080eff4955a004ac33c34c53dfb1 100755 --- a/samgr_endpoint/source/default_client_rpc.c +++ b/samgr_endpoint/source/default_client_rpc.c @@ -233,6 +233,7 @@ static int ProxyInvoke(IClientProxy *proxy, int funcId, IpcIo *request, IOwner o WriteInt32(&requestWrapper, (int32_t)header->saId); if (!IpcIoAppend(&requestWrapper, request)) { HILOG_ERROR(HILOG_MODULE_SAMGR, "ipc io append fail\n"); + FreeBuffer(tmpData2); return EC_INVALID; } int ret = SendRequest(header->target, funcId, &requestWrapper, &reply, flag, (uintptr_t *)&replyBuf);