Merge tag 'drivers-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[linux-2.6-microblaze.git] / kernel / audit_tree.c
index b2be4e9..2cd7b56 100644 (file)
@@ -593,7 +593,6 @@ static void prune_tree_chunks(struct audit_tree *victim, bool tagged)
                spin_lock(&hash_lock);
        }
        spin_unlock(&hash_lock);
-       put_tree(victim);
 }
 
 /*
@@ -602,6 +601,7 @@ static void prune_tree_chunks(struct audit_tree *victim, bool tagged)
 static void prune_one(struct audit_tree *victim)
 {
        prune_tree_chunks(victim, false);
+       put_tree(victim);
 }
 
 /* trim the uncommitted chunks from tree */