[sspi] fixing memory leaks during sspi context establishment failure

This commit is contained in:
Olga Kornievskaia 2011-03-24 14:51:10 -04:00
parent 4222bd6f2b
commit 5482c0e51f
2 changed files with 8 additions and 1 deletions

View file

@ -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;