[sspi] fixing memory leaks during sspi context establishment failure
This commit is contained in:
parent
4222bd6f2b
commit
5482c0e51f
2 changed files with 8 additions and 1 deletions
|
|
@ -122,8 +122,10 @@ authsspi_create(CLIENT *clnt, sspi_name_t name, struct rpc_sspi_sec *sec)
|
|||
save_auth = clnt->cl_auth;
|
||||
clnt->cl_auth = auth;
|
||||
|
||||
if (!authsspi_refresh(auth, NULL))
|
||||
if (!authsspi_refresh(auth, NULL)) {
|
||||
authsspi_destroy(auth);
|
||||
auth = NULL;
|
||||
}
|
||||
|
||||
clnt->cl_auth = save_auth;
|
||||
|
||||
|
|
|
|||
|
|
@ -633,6 +633,11 @@ call_again:
|
|||
}
|
||||
} /* end successful completion */
|
||||
else {
|
||||
if (ct->reply_msg.acpted_rply.ar_verf.oa_base != NULL) {
|
||||
xdrs->x_op = XDR_FREE;
|
||||
(void)xdr_opaque_auth(xdrs,
|
||||
&(ct->reply_msg.acpted_rply.ar_verf));
|
||||
}
|
||||
/* maybe our credentials need to be refreshed ... */
|
||||
if (refreshes-- && AUTH_REFRESH(cl->cl_auth, &ct->reply_msg))
|
||||
goto call_again;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue