krb5 commit: Fix minor leak in kdb5_util purge_mkeys

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/6d822841648761ac888b9a95693ad87a8aaf165c
commit 6d822841648761ac888b9a95693ad87a8aaf165c
Author: Greg Hudson <[email protected]>
Date:   Tue Jun 19 13:03:05 2018 -0400

    Fix minor leak in kdb5_util purge_mkeys
    
    In kdb5_purge_mkeys(), if krb5_dbe_update_mkey_aux() fails, use the
    cleanup label to free any allocated memory instead of returning
    immediately.  Reported by Bean Zhang.
    
    ticket: 8702

 src/kadmin/dbutil/kdb5_mkey.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/kadmin/dbutil/kdb5_mkey.c b/src/kadmin/dbutil/kdb5_mkey.c
index 2efe317..5395a60 100644
--- a/src/kadmin/dbutil/kdb5_mkey.c
+++ b/src/kadmin/dbutil/kdb5_mkey.c
@@ -1297,7 +1297,7 @@ kdb5_purge_mkeys(int argc, char *argv[])
         com_err(progname, retval,
                 _("while updating mkey_aux data for master principal entry"));
         exit_status++;
-        return;
+        goto cleanup_return;
     }
 
     if ((retval = krb5_timeofday(util_context, &now))) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.