]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs: ubifs: Make k(z)alloc/kfree symmetric
authorAlexander Dahl <ada@thorsis.com>
Wed, 3 Jul 2024 10:12:57 +0000 (12:12 +0200)
committerHeiko Schocher <hs@denx.de>
Sat, 10 Aug 2024 09:54:20 +0000 (11:54 +0200)
Although kfree() is in fact only a slim wrapper to free() in U-Boot, use
kfree() here, because those structs where allocated with kalloc() or
kzalloc().

Signed-off-by: Alexander Dahl <ada@thorsis.com>
fs/ubifs/super.c

index bbbbeb5ee17337141838e3aaddf95bd8a152c9a1..03ed603d0eab8fdce6f25ef527c66aa96a546aa1 100644 (file)
@@ -1762,8 +1762,8 @@ void ubifs_umount(struct ubifs_info *c)
        mutex_unlock(&c->umount_mutex);
        /* Finally free U-Boot's global copy of superblock */
        if (ubifs_sb != NULL) {
-               free(ubifs_sb->s_fs_info);
-               free(ubifs_sb);
+               kfree(ubifs_sb->s_fs_info);
+               kfree(ubifs_sb);
                ubifs_sb = NULL;
        }
 #endif