rpc: Resolve memory leak in mgmt_pmap_signout_cbk
Problem: At the time of submit signout request to mgmt rpc_clnt_mgmt_pmap_signout create a frame but in cbk frame is not destroyed Solution: cleanup frame in mgmt_pmap_signout_cbk to avoid leak Change-Id: I9961cacb2e02c8023c4c99e22e299b8729c2b09f fixes: bz#1658045 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
This commit is contained in:
parent
c9d117d54a
commit
607bbd935f
@ -35,7 +35,9 @@ mgmt_pmap_signout_cbk(struct rpc_req *req, struct iovec *iov, int count,
|
||||
0,
|
||||
};
|
||||
int ret = 0;
|
||||
call_frame_t *frame = NULL;
|
||||
|
||||
frame = myframe;
|
||||
if (-1 == req->rpc_status) {
|
||||
rsp.op_ret = -1;
|
||||
rsp.op_errno = EINVAL;
|
||||
@ -56,6 +58,10 @@ mgmt_pmap_signout_cbk(struct rpc_req *req, struct iovec *iov, int count,
|
||||
goto out;
|
||||
}
|
||||
out:
|
||||
if (frame) {
|
||||
STACK_DESTROY(frame->root);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user