[PATCH] fs: free inode->i_link
Sascha Hauer
s.hauer at pengutronix.de
Thu Nov 27 00:09:06 PST 2025
inode->i_link is an allocated string. Free it when the inode is deleted.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
fs/fs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/fs.c b/fs/fs.c
index 528299e039..2d6ee24846 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -826,6 +826,8 @@ static int dentry_delete_subtree(struct super_block *sb, struct dentry *parent)
static void destroy_inode(struct inode *inode)
{
+ free(inode->i_link);
+
if (inode->i_sb->s_op->destroy_inode)
inode->i_sb->s_op->destroy_inode(inode);
else
--
2.47.3
More information about the barebox
mailing list