krb5_wrap: Fix CID 1414755 Resource leak
authorVolker Lendecke <vl@samba.org>
Fri, 30 Mar 2018 16:08:05 +0000 (11:08 -0500)
committerJeremy Allison <jra@samba.org>
Wed, 4 Apr 2018 01:51:00 +0000 (03:51 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr  4 03:51:00 CEST 2018 on sn-devel-144

lib/krb5_wrap/keytab_util.c

index fd8308c..5fe9216 100644 (file)
@@ -66,6 +66,7 @@ static krb5_error_code copy_one_entry(krb5_context context,
                                        KRB5_KEY_TYPE(KRB5_KT_KEY(&entry)),
                                        &etype_str);
     if(ret) {
+        krb5_free_unparsed_name(context, name_str);
        krb5_set_error_message(context, ret, "krb5_enctype_to_string");
        etype_str = NULL; /* XXX */
        return ret;