Commit 87f0d5c8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Joel Becker

ocfs2: null deref on allocation error

The original code had a null derefence in the error handling.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarJoel Becker <jlbec@evilplan.org>
parent 3d75be7c
......@@ -381,7 +381,7 @@ int ocfs2_info_handle_freeinode(struct inode *inode,
if (!oifi) {
status = -ENOMEM;
mlog_errno(status);
goto bail;
goto out_err;
}
if (o2info_from_user(*oifi, req))
......@@ -431,7 +431,7 @@ int ocfs2_info_handle_freeinode(struct inode *inode,
o2info_set_request_error(&oifi->ifi_req, req);
kfree(oifi);
out_err:
return status;
}
......@@ -666,7 +666,7 @@ int ocfs2_info_handle_freefrag(struct inode *inode,
if (!oiff) {
status = -ENOMEM;
mlog_errno(status);
goto bail;
goto out_err;
}
if (o2info_from_user(*oiff, req))
......@@ -716,7 +716,7 @@ int ocfs2_info_handle_freefrag(struct inode *inode,
o2info_set_request_error(&oiff->iff_req, req);
kfree(oiff);
out_err:
return status;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment