diff options
author | Michael Adam <obnox@samba.org> | 2007-08-31 13:39:51 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:26 -0500 |
commit | b20269287545926efff02b03642b1920d3afb3e4 (patch) | |
tree | fc9f5185873af6a5b33a3e03f0c58aeea44d0eed /source3/libads | |
parent | 55b59eb80b8d9268f0e21cbec9d878f99704f547 (diff) | |
download | samba-b20269287545926efff02b03642b1920d3afb3e4.tar.gz samba-b20269287545926efff02b03642b1920d3afb3e4.tar.bz2 samba-b20269287545926efff02b03642b1920d3afb3e4.zip |
r24836: Initialize some uninitialized variables.
This prevents a segfault when get_kdc_ip_string() is called
with sitename == NULL.
Michael
(This used to be commit 58d31e057b57bc69a96e63aabba9aa1da5418d83)
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/kerberos.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index 2cf0577687..1b5ec88dcf 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -616,9 +616,11 @@ int kerberos_kinit_password(const char *principal, 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)); |