From: Daniel KouĊ™il Date: Tue, 7 Feb 2006 22:08:13 +0000 (+0000) Subject: don't return unitialized values X-Git-Tag: merge_for_3_1_dst~21 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=d6fa8e19532155aa54058b943a9127242f42fbf7;p=jra1mw.git don't return unitialized values --- diff --git a/org.glite.security.gsoap-plugin/src/glite_gss.c b/org.glite.security.gsoap-plugin/src/glite_gss.c index 8cb3351..7f79063 100644 --- a/org.glite.security.gsoap-plugin/src/glite_gss.c +++ b/org.glite.security.gsoap-plugin/src/glite_gss.c @@ -582,6 +582,7 @@ edg_wll_gss_connect(gss_cred_id_t cred, char const *hostname, int port, char *servername = NULL; maj_stat = min_stat = min_stat2 = req_flags = 0; + memset(connection, 0, sizeof(*connection)); /* GSI specific */ req_flags = GSS_C_GLOBUS_SSL_COMPATIBLE; @@ -653,7 +654,6 @@ edg_wll_gss_connect(gss_cred_id_t cred, char const *hostname, int port, /* XXX check ret_flags matches to what was requested */ - memset(connection, 0, sizeof(*connection)); connection->sock = sock; connection->context = context; servername = NULL; @@ -687,6 +687,7 @@ edg_wll_gss_accept(gss_cred_id_t cred, int sock, struct timeval *timeout, int ret; maj_stat = min_stat = min_stat2 = 0; + memset(connection, 0, sizeof(*connection)); /* GSI specific */ ret_flags = GSS_C_GLOBUS_SSL_COMPATIBLE; @@ -731,7 +732,6 @@ edg_wll_gss_accept(gss_cred_id_t cred, int sock, struct timeval *timeout, goto end; } - memset(connection, 0, sizeof(*connection)); connection->sock = sock; connection->context = context; memset(&output_token, 0, sizeof(output_token.value));