diff options
| author | Simo Sorce <simo@redhat.com> | 2013-04-03 09:25:37 -0400 |
|---|---|---|
| committer | Simo Sorce <simo@redhat.com> | 2013-04-03 16:39:11 -0400 |
| commit | 20f5dd06be93df2d7ad3a1d76d8aac3a29ee8684 (patch) | |
| tree | 572c71082185d1a16f6c9b879a45869bca14b2f3 /proxy/src/mechglue | |
| parent | 94a4d4947c41379fb74e229b1b0b00d554f170be (diff) | |
| download | gss-proxy-20f5dd06be93df2d7ad3a1d76d8aac3a29ee8684.tar.gz gss-proxy-20f5dd06be93df2d7ad3a1d76d8aac3a29ee8684.tar.xz gss-proxy-20f5dd06be93df2d7ad3a1d76d8aac3a29ee8684.zip | |
Fix uninizialized variables found by Coverity
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'proxy/src/mechglue')
| -rw-r--r-- | proxy/src/mechglue/gpp_creds.c | 13 | ||||
| -rw-r--r-- | proxy/src/mechglue/gpp_init_sec_context.c | 3 |
2 files changed, 8 insertions, 8 deletions
diff --git a/proxy/src/mechglue/gpp_creds.c b/proxy/src/mechglue/gpp_creds.c index 7da2237..d9c18fe 100644 --- a/proxy/src/mechglue/gpp_creds.c +++ b/proxy/src/mechglue/gpp_creds.c @@ -63,18 +63,17 @@ OM_uint32 gppint_get_def_creds(OM_uint32 *minor_status, struct gpp_cred_handle **cred_handle) { struct gpp_cred_handle *cred; - OM_uint32 tmaj, tmin; - OM_uint32 maj, min; + OM_uint32 tmaj = GSS_S_COMPLETE; + OM_uint32 tmin = 0; + OM_uint32 maj = GSS_S_FAILURE; + OM_uint32 min = 0; cred = calloc(1, sizeof(struct gpp_cred_handle)); if (!cred) { - *minor_status = 0; - return GSS_S_FAILURE; + min = ENOMEM; + goto done; } - tmaj = GSS_S_COMPLETE; - tmin = 0; - /* See if we should try local first */ if (behavior == GPP_LOCAL_ONLY || behavior == GPP_LOCAL_FIRST) { diff --git a/proxy/src/mechglue/gpp_init_sec_context.c b/proxy/src/mechglue/gpp_init_sec_context.c index fc0489f..1b233a7 100644 --- a/proxy/src/mechglue/gpp_init_sec_context.c +++ b/proxy/src/mechglue/gpp_init_sec_context.c @@ -82,7 +82,7 @@ OM_uint32 gssi_init_sec_context(OM_uint32 *minor_status, OM_uint32 *ret_flags, OM_uint32 *time_rec) { - enum gpp_behavior behavior; + enum gpp_behavior behavior = GPP_UNINITIALIZED; struct gpp_context_handle *ctx_handle = NULL; struct gpp_cred_handle *cred_handle = NULL; struct gpp_name_handle *name; @@ -100,6 +100,7 @@ OM_uint32 gssi_init_sec_context(OM_uint32 *minor_status, if (mech_type == GSS_C_NO_OID || gpp_is_special_oid(mech_type)) { maj = GSS_S_BAD_MECH; + min = 0; goto done; } |
