diff options
author | Simo Sorce <simo@redhat.com> | 2016-04-21 14:52:18 -0400 |
---|---|---|
committer | Robbie Harwood <rharwood@redhat.com> | 2016-04-22 12:17:12 -0400 |
commit | 8f17be689aec490a2d396b1279e4e6ceecd540ab (patch) | |
tree | b87954c1de1fa5c27710799cfbc3f3e25816bf5a | |
parent | 6ceb6126a729c2b4cdcdc381494f35965bdd9318 (diff) | |
download | gss-proxy-8f17be689aec490a2d396b1279e4e6ceecd540ab.tar.gz gss-proxy-8f17be689aec490a2d396b1279e4e6ceecd540ab.tar.xz gss-proxy-8f17be689aec490a2d396b1279e4e6ceecd540ab.zip |
Fix use after free bug
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Robbie Harwood <rharwood@redhat.com>
-rw-r--r-- | proxy/src/gp_creds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/proxy/src/gp_creds.c b/proxy/src/gp_creds.c index e7f2676..255200c 100644 --- a/proxy/src/gp_creds.c +++ b/proxy/src/gp_creds.c @@ -316,11 +316,12 @@ static int gp_get_cred_environment(struct gp_call_ctx *gpcall, namebuf.length = strlen(str); ret_maj = gss_import_name(&ret_min, &namebuf, GSS_C_NT_USER_NAME, requested_name); - safefree(str); if (ret_maj) { GPERROR("Failed to import username %s\n", str); + safefree(str); return ENOMEM; } + safefree(str); } } |