summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-05-29 22:57:16 +0300
committerJoel Becker <jlbec@evilplan.org>2011-05-31 19:03:45 -0700
commit87f0d5c8db7aad85b9120c26723fdc63cd84a460 (patch)
tree7233a07d4a4ac888db738c1ddd25b868ec13c8f3 /fs/ocfs2
parent3d75be7c4771c7e4d5b5fa586a599af8473de32c (diff)
downloadop-kernel-dev-87f0d5c8db7aad85b9120c26723fdc63cd84a460.zip
op-kernel-dev-87f0d5c8db7aad85b9120c26723fdc63cd84a460.tar.gz
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>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/ioctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c
index bc91072..d9a6ce7 100644
--- a/fs/ocfs2/ioctl.c
+++ b/fs/ocfs2/ioctl.c
@@ -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 @@ bail:
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 @@ bail:
o2info_set_request_error(&oiff->iff_req, req);
kfree(oiff);
-
+out_err:
return status;
}
OpenPOWER on IntegriCloud