summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2007-01-23 01:18:17 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2007-01-23 01:18:17 +0000
commit1353e0b780d643dad17f3437c3e0d610b20c95ca (patch)
treeae8e06cb3d9847336f81ae39179e7fd5dde4de50 /src/lib
parent53585c4380b798de18518b57dcf92bbf1efa7dd8 (diff)
downloadkrb5-1353e0b780d643dad17f3437c3e0d610b20c95ca.tar.gz
krb5-1353e0b780d643dad17f3437c3e0d610b20c95ca.tar.xz
krb5-1353e0b780d643dad17f3437c3e0d610b20c95ca.zip
kt_file.c memory leak on error in krb5_kt_resolve / krb5_kt_wresolve
The krb5_kt_resolve and krb5_kt_wresolve functions leak the 'data' memory allocation if the lock cannot be initialized. ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19104 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/keytab/kt_file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/krb5/keytab/kt_file.c b/src/lib/krb5/keytab/kt_file.c
index c31b90f34..92947d593 100644
--- a/src/lib/krb5/keytab/kt_file.c
+++ b/src/lib/krb5/keytab/kt_file.c
@@ -193,6 +193,7 @@ krb5_ktfile_resolve(krb5_context context, const char *name, krb5_keytab *id)
err = k5_mutex_init(&data->lock);
if (err) {
+ krb5_xfree(data);
krb5_xfree(*id);
return err;
}
@@ -791,6 +792,7 @@ krb5_ktfile_wresolve(krb5_context context, const char *name, krb5_keytab *id)
err = k5_mutex_init(&data->lock);
if (err) {
+ krb5_xfree(data);
krb5_xfree(*id);
return err;
}