diff mbox

[3/5] Fixed warnings in src/g_inq_cred.c

Message ID 1351102124-24036-4-git-send-email-steved@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Steve Dickson Oct. 24, 2012, 6:08 p.m. UTC
From: Yao Zhao <yao.zhao@windriver.com>

g_inq_cred.c:161:8: warning: passing argument 3 of
'generic_gss_copy_oid' from incompatible pointer type [enabled by default]

Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
 src/g_inq_cred.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/src/g_inq_cred.c b/src/g_inq_cred.c
index 9f531d8..8367a56 100644
--- a/src/g_inq_cred.c
+++ b/src/g_inq_cred.c
@@ -152,13 +152,15 @@  gss_OID_set *		mechanisms;
 			     union_cred->count);
 	if ((*mechanisms)->elements == NULL) {
 	    *minor_status = ENOMEM;
+	    free(*mechanisms);
+	    *mechanisms = GSS_C_NO_OID_SET;
 	    return (GSS_S_FAILURE);
 	}
 
 	for (i=0; i < union_cred->count; i++) {
-	    status = generic_gss_copy_oid(minor_status,
+	    status = generic_gss_add_oid_set_member(minor_status,
 	    				  &union_cred->mechs_array[i],
-					  &((*mechanisms)->elements[i]));
+					  mechanisms);
 	    if (status != GSS_S_COMPLETE)
 	        break;
 	}