]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
krb5_db_delete_principal() can fail to unlock ulog
authorNicolas Williams <nico@cryptonector.com>
Wed, 3 Oct 2012 22:22:12 +0000 (17:22 -0500)
committerGreg Hudson <ghudson@mit.edu>
Mon, 8 Oct 2012 15:38:37 +0000 (11:38 -0400)
Not really: only when the KDB backend lacks a delete method.  Still.

ticket: 7403

src/lib/kdb/kdb5.c

index 3cf116b76ef64ceb03b9ac66f0197cfd5e4b87b3..d02bb5025bdcbca30c638e3809554f35e58f62fa 100644 (file)
@@ -986,8 +986,10 @@ krb5_db_delete_principal(krb5_context kcontext, krb5_principal search_for)
         free(princ_name);
     }
 
-    if (v->delete_principal == NULL)
+    if (v->delete_principal == NULL) {
+        ulog_lock(kcontext, KRB5_LOCKMODE_UNLOCK);
         return KRB5_PLUGIN_OP_NOTSUPP;
+    }
 
     status = v->delete_principal(kcontext, search_for);