Author: obnox Date: 2007-08-31 13:39:51 +0000 (Fri, 31 Aug 2007) New Revision: 24836
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24836 Log: Initialize some uninitialized variables. This prevents a segfault when get_kdc_ip_string() is called with sitename == NULL. Michael Modified: branches/SAMBA_3_2/source/libads/kerberos.c branches/SAMBA_3_2_0/source/libads/kerberos.c Changeset: Modified: branches/SAMBA_3_2/source/libads/kerberos.c =================================================================== --- branches/SAMBA_3_2/source/libads/kerberos.c 2007-08-31 13:30:47 UTC (rev 24835) +++ branches/SAMBA_3_2/source/libads/kerberos.c 2007-08-31 13:39:51 UTC (rev 24836) @@ -616,9 +616,11 @@ static char *get_kdc_ip_string(char *mem_ctx, const char *realm, const char *sitename, struct in_addr primary_ip) { - struct ip_service *ip_srv_site; - struct ip_service *ip_srv_nonsite; - int count_site, count_nonsite, i; + int i; + struct ip_service *ip_srv_site = NULL; + struct ip_service *ip_srv_nonsite = NULL; + int count_site = 0; + int count_nonsite = 0; char *kdc_str = talloc_asprintf(mem_ctx, "\tkdc = %s\n", inet_ntoa(primary_ip)); Modified: branches/SAMBA_3_2_0/source/libads/kerberos.c =================================================================== --- branches/SAMBA_3_2_0/source/libads/kerberos.c 2007-08-31 13:30:47 UTC (rev 24835) +++ branches/SAMBA_3_2_0/source/libads/kerberos.c 2007-08-31 13:39:51 UTC (rev 24836) @@ -616,9 +616,11 @@ static char *get_kdc_ip_string(char *mem_ctx, const char *realm, const char *sitename, struct in_addr primary_ip) { - struct ip_service *ip_srv_site; - struct ip_service *ip_srv_nonsite; - int count_site, count_nonsite, i; + int i; + struct ip_service *ip_srv_site = NULL; + struct ip_service *ip_srv_nonsite = NULL; + int count_site = 0; + int count_nonsite = 0; char *kdc_str = talloc_asprintf(mem_ctx, "\tkdc = %s\n", inet_ntoa(primary_ip));