diff --git a/fs/hfs/bfind.c b/fs/hfs/bfind.c index ef9498a6e88a..f225c78a9e66 100644 --- a/fs/hfs/bfind.c +++ b/fs/hfs/bfind.c @@ -136,6 +136,8 @@ int hfs_brec_find(struct hfs_find_data *fd) bnode->parent = parent; res = __hfs_brec_find(bnode, fd); + if (res < 0) + goto release; if (!height) break; if (fd->record < 0)