summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2012-03-23 09:58:27 -0400
committerSimo Sorce <simo@redhat.com>2012-04-02 12:54:54 -0400
commit14ef713434acb89e8c715eed7ba180a38fd604a9 (patch)
tree3fb639048ecd6d83d63bfa1a4fa970b49c03d45f
parent7238bcee88d0b785e36f6d221b4c54fc4d73bb4e (diff)
downloadgss-proxy-14ef713434acb89e8c715eed7ba180a38fd604a9.tar.gz
gss-proxy-14ef713434acb89e8c715eed7ba180a38fd604a9.tar.xz
gss-proxy-14ef713434acb89e8c715eed7ba180a38fd604a9.zip
Avoid double free on error.
There is no need to expliciltly free here, as gp_rpc_process_call already always frees the res structure. By doing this we cause double frees on errors.
-rw-r--r--proxy/src/gp_rpc_accept_sec_context.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/proxy/src/gp_rpc_accept_sec_context.c b/proxy/src/gp_rpc_accept_sec_context.c
index 62d2387..96c781b 100644
--- a/proxy/src/gp_rpc_accept_sec_context.c
+++ b/proxy/src/gp_rpc_accept_sec_context.c
@@ -129,16 +129,6 @@ done:
ret_maj, ret_min, oid,
&ascr->status);
- if (ret_maj) {
- if (ascr->context_handle) {
- xdr_free((xdrproc_t)xdr_gssx_ctx, (char *)ascr->context_handle);
- free(ascr->context_handle);
- }
- if (ascr->output_token) {
- xdr_free((xdrproc_t)xdr_gssx_buffer, (char *)ascr->output_token);
- free(ascr->output_token);
- }
- }
gss_release_name(&ret_min, &src_name);
gss_release_buffer(&ret_min, &obuf);
gss_release_cred(&ret_min, &dch);