[CIFS] clean up error handling in cifs_mount
authorJeff Layton <jlayton@redhat.com>
Fri, 16 Nov 2007 22:21:07 +0000 (22:21 +0000)
committerSteve French <sfrench@us.ibm.com>
Fri, 16 Nov 2007 22:21:07 +0000 (22:21 +0000)
commit70fe7dc05596a405ee6a83265f675a544e32f7d8
tree92bbeb52c1f66cdefd556bdd6d5170e751ab457b
parent68bf728a225b7f2045bb501854d6e7695b9b015d
[CIFS] clean up error handling in cifs_mount

Move all of the kfree's sprinkled in the middle of the function to the
end, and have the code set rc and just goto there on error. Also zero
out the password string before freeing it. Looks like this should also
fix a potential memory leak of the prepath string if an error occurs
near the end of the function.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/connect.c