]> the.earth.li Git - onak.git/commitdiff
Add missing initialisation of DB4 cursor for skshash when deleting key
authorJonathan McDowell <noodles@earth.li>
Mon, 2 Apr 2012 00:24:18 +0000 (17:24 -0700)
committerJonathan McDowell <noodles@earth.li>
Mon, 2 Apr 2012 00:24:18 +0000 (17:24 -0700)
  We were trying to use the id32db cursor which had already been closed.

keydb_db4.c

index 638be28dc2583afe5932cdceeb5df0c785882f5a..065fb5b690364099d3f06c90e6a41a4c1742cf62 100644 (file)
@@ -1013,6 +1013,10 @@ static int db4_delete_key(uint64_t keyid, bool intrans)
        }
 
        if (!deadlock) {
+               ret = skshashdb->cursor(skshashdb,
+                       txn,
+                       &cursor,
+                       0);   /* flags */
                get_skshash(publickey, &hash);
 
                memset(&key, 0, sizeof(key));