From 77c3d82e4817d74eaf217ffe4addb2dfa1a4a84c Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 16 Dec 1997 16:01:04 +0000 Subject: [PATCH] * locate_kdc.c (krb5_locate_kdc): Free hostlist array elements when finished with them. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10338 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 5 +++++ src/lib/krb5/os/locate_kdc.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 6f7268388..d530ee313 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,8 @@ +Tue Dec 16 11:00:18 1997 Ezra Peisach + + * locate_kdc.c (krb5_locate_kdc): Free hostlist array elements + when finished with them. + Sat Dec 6 23:12:23 1997 Ezra Peisach * locate_kdc.c (krb5_locate_kdc): Get rid of extra krb5_xfree diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c index 1437bbe4e..220d12e3c 100644 --- a/src/lib/krb5/os/locate_kdc.c +++ b/src/lib/krb5/os/locate_kdc.c @@ -209,6 +209,10 @@ krb5_locate_kdc(context, realm, addr_pp, naddrs, master_index, nmasters) } if (masterlist) *nmasters = out - *master_index; + + /* Free the hostlist entry we are looping over. */ + free(hostlist[i]); + hostlist[i] = 0; } -- 2.26.2