Signed-off-by: Hu Weiwen <[email protected]>
---
fixes a typo in v1

 lib/inode.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/inode.c b/lib/inode.c
index d6a64cc..6f6e984 100644
--- a/lib/inode.c
+++ b/lib/inode.c
@@ -868,9 +868,13 @@ struct erofs_inode *erofs_iget_from_path(const char *path, 
bool is_src)

        ret = erofs_fill_inode(inode, &st, path);
        if (ret)
-               return ERR_PTR(ret);
+               goto err;

        return inode;
+
+err:
+       free(inode);
+       return ERR_PTR(ret);
 }

 void erofs_fixup_meta_blkaddr(struct erofs_inode *rootdir)
--
2.30.0

Reply via email to