ocfs2: null deref on allocation error

The original code had a null derefence in the error handling.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
This commit is contained in:
Dan Carpenter 2011-05-29 22:57:16 +03:00 committed by Joel Becker
parent 3d75be7c47
commit 87f0d5c8db
1 changed files with 4 additions and 4 deletions

View File

@ -381,7 +381,7 @@ int ocfs2_info_handle_freeinode(struct inode *inode,
if (!oifi) { if (!oifi) {
status = -ENOMEM; status = -ENOMEM;
mlog_errno(status); mlog_errno(status);
goto bail; goto out_err;
} }
if (o2info_from_user(*oifi, req)) if (o2info_from_user(*oifi, req))
@ -431,7 +431,7 @@ bail:
o2info_set_request_error(&oifi->ifi_req, req); o2info_set_request_error(&oifi->ifi_req, req);
kfree(oifi); kfree(oifi);
out_err:
return status; return status;
} }
@ -666,7 +666,7 @@ int ocfs2_info_handle_freefrag(struct inode *inode,
if (!oiff) { if (!oiff) {
status = -ENOMEM; status = -ENOMEM;
mlog_errno(status); mlog_errno(status);
goto bail; goto out_err;
} }
if (o2info_from_user(*oiff, req)) if (o2info_from_user(*oiff, req))
@ -716,7 +716,7 @@ bail:
o2info_set_request_error(&oiff->iff_req, req); o2info_set_request_error(&oiff->iff_req, req);
kfree(oiff); kfree(oiff);
out_err:
return status; return status;
} }