Skip to content

Commit

Permalink
powerpc/cacheinfo: Remove double free
Browse files Browse the repository at this point in the history
kfree() after kobject_put(). Who ever wrote this was on crack.

Fixes: 7e80397 ("powerpc/cacheinfo: Fix kobject memleak")
Signed-off-by: Tobin C. Harding <tobin@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Tobin C. Harding authored and mpe committed May 17, 2019
1 parent c179976 commit 672eaf3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/powerpc/kernel/cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,6 @@ static void cacheinfo_create_index_dir(struct cache *cache, int index,
cache_dir->kobj, "index%d", index);
if (rc) {
kobject_put(&index_dir->kobj);
kfree(index_dir);
return;
}

Expand Down

0 comments on commit 672eaf3

Please sign in to comment.