diff options
| author | Dan Carpenter <error27@gmail.com> | 2011-05-29 15:57:16 -0400 |
|---|---|---|
| committer | Joel Becker <jlbec@evilplan.org> | 2011-05-31 22:03:45 -0400 |
| commit | 87f0d5c8db7aad85b9120c26723fdc63cd84a460 (patch) | |
| tree | 7233a07d4a4ac888db738c1ddd25b868ec13c8f3 | |
| parent | 3d75be7c4771c7e4d5b5fa586a599af8473de32c (diff) | |
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>
| -rw-r--r-- | fs/ocfs2/ioctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c index bc91072b7219..d9a6ce779266 100644 --- a/fs/ocfs2/ioctl.c +++ b/fs/ocfs2/ioctl.c | |||
| @@ -381,7 +381,7 @@ int ocfs2_info_handle_freeinode(struct inode *inode, | |||
| 381 | if (!oifi) { | 381 | if (!oifi) { |
| 382 | status = -ENOMEM; | 382 | status = -ENOMEM; |
| 383 | mlog_errno(status); | 383 | mlog_errno(status); |
| 384 | goto bail; | 384 | goto out_err; |
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | if (o2info_from_user(*oifi, req)) | 387 | if (o2info_from_user(*oifi, req)) |
| @@ -431,7 +431,7 @@ bail: | |||
| 431 | o2info_set_request_error(&oifi->ifi_req, req); | 431 | o2info_set_request_error(&oifi->ifi_req, req); |
| 432 | 432 | ||
| 433 | kfree(oifi); | 433 | kfree(oifi); |
| 434 | 434 | out_err: | |
| 435 | return status; | 435 | return status; |
| 436 | } | 436 | } |
| 437 | 437 | ||
| @@ -666,7 +666,7 @@ int ocfs2_info_handle_freefrag(struct inode *inode, | |||
| 666 | if (!oiff) { | 666 | if (!oiff) { |
| 667 | status = -ENOMEM; | 667 | status = -ENOMEM; |
| 668 | mlog_errno(status); | 668 | mlog_errno(status); |
| 669 | goto bail; | 669 | goto out_err; |
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | if (o2info_from_user(*oiff, req)) | 672 | if (o2info_from_user(*oiff, req)) |
| @@ -716,7 +716,7 @@ bail: | |||
| 716 | o2info_set_request_error(&oiff->iff_req, req); | 716 | o2info_set_request_error(&oiff->iff_req, req); |
| 717 | 717 | ||
| 718 | kfree(oiff); | 718 | kfree(oiff); |
| 719 | 719 | out_err: | |
| 720 | return status; | 720 | return status; |
| 721 | } | 721 | } |
| 722 | 722 | ||
