From: Sankar P Subject: [PATCH] novfs: Fix a memory leak that causes an OOM condition References: bnc#610828 Patch-mainline: No The patch fixes a serious memory leak issue, that causes machine go to OOM condition that makes it unusable. Signed-off-by: Sankar P Acked-by: Jan Kara --- fs/novfs/inode.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/fs/novfs/inode.c +++ b/fs/novfs/inode.c @@ -3421,11 +3421,8 @@ ssize_t novfs_i_getxattr(struct dentry * retxcode = -ERANGE; } } - - if (bufRead) { - kfree(bufRead); - } } + kfree(bufRead); } } kfree(buf);