Skip to content

Commit

Permalink
cifs: fix inverted NULL check after kmalloc
Browse files Browse the repository at this point in the history
cifs: fix inverted NULL check after kmalloc

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Jeff Layton authored and Steve French committed Sep 24, 2008
1 parent 9d81523 commit 74553b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
info_buf_source =
kmalloc(2 * sizeof(FILE_UNIX_BASIC_INFO),
GFP_KERNEL);
if (info_buf_source != NULL)
if (info_buf_source == NULL)
goto unlink_target;

info_buf_target = info_buf_source + 1;
Expand Down

0 comments on commit 74553b1

Please sign in to comment.