kadmin: stash() do not leak 'mkey' if early exit

Change-Id: I4d9f847e833a895933dcd69cc1e7aed80d85aea5
This commit is contained in:
Jeffrey Altman
2016-11-19 02:16:19 -05:00
parent 2f62c7c77e
commit 04f17a5bae

View File

@@ -75,6 +75,7 @@ stash(struct stash_options *opt, int argc, char **argv)
if (ret)
krb5_warn(context, ret, "reading master key from %s",
opt->key_file_string);
hdb_free_master_key(context, mkey);
return 0;
} else {
krb5_keyblock key;