diff options
author | Simo Sorce <simo@redhat.com> | 2013-04-03 14:57:59 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2013-04-03 16:39:11 -0400 |
commit | ca7a49fbefef59fe4839a83077a3abaa995c47d9 (patch) | |
tree | eb688dd304be2eb4808e13905bc667d23ff5be61 /proxy/src/gp_conv.c | |
parent | d3bb4d70f00d429b21e481c7944a1851df14b9a4 (diff) | |
download | gss-proxy-ca7a49fbefef59fe4839a83077a3abaa995c47d9.tar.gz gss-proxy-ca7a49fbefef59fe4839a83077a3abaa995c47d9.tar.xz gss-proxy-ca7a49fbefef59fe4839a83077a3abaa995c47d9.zip |
Fix dereference after null checks found by Coverity
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'proxy/src/gp_conv.c')
-rw-r--r-- | proxy/src/gp_conv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/proxy/src/gp_conv.c b/proxy/src/gp_conv.c index f402ba7..cccfe16 100644 --- a/proxy/src/gp_conv.c +++ b/proxy/src/gp_conv.c @@ -300,7 +300,7 @@ int gp_conv_err_to_gssx_string(uint32_t status, int type, gss_OID oid, ret_maj = gss_display_status(&ret_min, status, type, oid, &msg_ctx, &gssbuf); - if (ret_maj == 0) { + if (ret_maj == GSS_S_COMPLETE) { if (str) { ret = asprintf(&t, "%s, %s", str, (char *)gssbuf.value); if (ret == -1) { @@ -316,9 +316,10 @@ int gp_conv_err_to_gssx_string(uint32_t status, int type, gss_OID oid, } } gss_release_buffer(&ret_min, &gssbuf); - } - if (ret_maj) { + } else { ret = EINVAL; + } + if (ret) { goto done; } } while (msg_ctx); |