summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2016-09-27 18:30:29 +0200
committerGünther Deschner <gd@samba.org>2016-09-29 18:30:18 +0200
commit9ad014ea4f9e0a770e4d90815410844180e22461 (patch)
treeedab31991d953d7de16675109cdd273aaac85570 /source4/kdc
parent9e98ac05c24bac7e49821160b0b3330fb95b68c2 (diff)
downloadsamba-9ad014ea4f9e0a770e4d90815410844180e22461.tar.gz
s4-kdc: Fix Coverity ID #1373386 (Resource Leak)
Guenther Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/db-glue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c
index ef750a806ca..d7bba3d35e4 100644
--- a/source4/kdc/db-glue.c
+++ b/source4/kdc/db-glue.c
@@ -238,6 +238,7 @@ static int samba_kdc_sort_encryption_keys(struct sdb_entry_ex *entry_ex)
/* Paranoia: Do not overflow the key_data array */
if (idx > keys_size) {
+ free(sorted_keys);
return -1;
}
@@ -250,6 +251,7 @@ static int samba_kdc_sort_encryption_keys(struct sdb_entry_ex *entry_ex)
/* Paranoia: Something went wrong during data copy */
if (idx < keys_size) {
+ free(sorted_keys);
return -1;
}