diff options
author | Greg Hudson <ghudson@mit.edu> | 2016-06-29 17:13:33 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2016-08-10 17:23:41 -0400 |
commit | 73c9944ae86cf3a89e11d3d3f15dd9b8da7b9cd1 (patch) | |
tree | 6e53526e6129197424bf37336b6edebf0bb66ec5 /src/lib/kdb | |
parent | eb24cc9ca32998eb370ffd6c93dcf7d62c770e5a (diff) | |
download | krb5-73c9944ae86cf3a89e11d3d3f15dd9b8da7b9cd1.zip krb5-73c9944ae86cf3a89e11d3d3f15dd9b8da7b9cd1.tar.gz krb5-73c9944ae86cf3a89e11d3d3f15dd9b8da7b9cd1.tar.bz2 |
Fix a variety of one-time leaks
Eliminate some memory leaks which should not affect normal operation,
but which make it harder to detect more serious memory leaks.
In kdb5_util, start using the already existing quit() function and
remove redundant DB and master key cleanup performed by individual
commands. In kdb5_destroy(), use util_context instead of creating a
new one. Add an mkey_fullname global variable and use it to make
a bunch of krb5_db_setup_mkey_name() calls unnecessary.
Diffstat (limited to 'src/lib/kdb')
-rw-r--r-- | src/lib/kdb/kdb5.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/kdb/kdb5.c b/src/lib/kdb/kdb5.c index 713b39d..a3139a7 100644 --- a/src/lib/kdb/kdb5.c +++ b/src/lib/kdb/kdb5.c @@ -1728,6 +1728,7 @@ krb5_error_code krb5_dbe_update_mkey_aux(krb5_context context, krb5_db_entry *entry, krb5_mkey_aux_node *mkey_aux_data_list) { + krb5_error_code status; krb5_tl_data tl_data; krb5_int16 version, tmp_kvno; unsigned char *nextloc; @@ -1792,7 +1793,9 @@ krb5_dbe_update_mkey_aux(krb5_context context, krb5_db_entry *entry, } } - return (krb5_dbe_update_tl_data(context, entry, &tl_data)); + status = krb5_dbe_update_tl_data(context, entry, &tl_data); + free(tl_data.tl_data_contents); + return status; } #endif /* KRB5_TL_MKEY_AUX_VER == 1 */ |