summaryrefslogtreecommitdiffstats
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-05-24 22:13:07 +0200
committerVolker Lendecke <vl@samba.org>2009-05-24 22:13:07 +0200
commit5302db632660de44129d7cf48073bf52c9b27eca (patch)
tree2c10a40aba7d57bdcde8582fe74b3b68b0b61eff /source3/smbd/reply.c
parent68c5c6df0eeae16c56d0abc1b5ec275d18410224 (diff)
downloadsamba-5302db632660de44129d7cf48073bf52c9b27eca.tar.gz
samba-5302db632660de44129d7cf48073bf52c9b27eca.tar.xz
samba-5302db632660de44129d7cf48073bf52c9b27eca.zip
TALLOC_FREE happily lives with a NULL ptr. Tim, please check!
Thanks, Volker
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c44
1 files changed, 11 insertions, 33 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index c15ebbe35e3..d5ee918b82a 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1030,17 +1030,13 @@ void reply_checkpath(struct smb_request *req)
reply_outbuf(req, 0, 0);
out:
- if (smb_fname) {
- TALLOC_FREE(smb_fname);
- }
+ TALLOC_FREE(smb_fname);
END_PROFILE(SMBcheckpath);
return;
path_err:
- if (smb_fname) {
- TALLOC_FREE(smb_fname);
- }
+ TALLOC_FREE(smb_fname);
END_PROFILE(SMBcheckpath);
@@ -1164,9 +1160,7 @@ void reply_getatr(struct smb_request *req)
DEBUG(3,("reply_getatr: name=%s mode=%d size=%u\n", fname, mode, (unsigned int)size ) );
out:
- if (smb_fname) {
- TALLOC_FREE(smb_fname);
- }
+ TALLOC_FREE(smb_fname);
END_PROFILE(SMBgetatr);
return;
}
@@ -1272,9 +1266,7 @@ void reply_setatr(struct smb_request *req)
DEBUG( 3, ( "setatr name=%s mode=%d\n", fname, mode ) );
out:
- if (smb_fname) {
- TALLOC_FREE(smb_fname);
- }
+ TALLOC_FREE(smb_fname);
END_PROFILE(SMBsetatr);
return;
}
@@ -2316,9 +2308,7 @@ void reply_ctemp(struct smb_request *req)
DEBUG( 3, ( "reply_ctemp %s fd=%d umode=0%o\n", fsp->fsp_name,
fsp->fh->fd, (unsigned int)smb_fname->st.st_mode));
out:
- if (smb_fname) {
- TALLOC_FREE(smb_fname);
- }
+ TALLOC_FREE(smb_fname);
END_PROFILE(SMBctemp);
return;
}
@@ -5246,9 +5236,7 @@ void reply_mkdir(struct smb_request *req)
DEBUG( 3, ( "mkdir %s\n", directory ) );
out:
- if (smb_dname) {
- TALLOC_FREE(smb_dname);
- }
+ TALLOC_FREE(smb_dname);
END_PROFILE(SMBmkdir);
return;
}
@@ -5512,9 +5500,7 @@ void reply_rmdir(struct smb_request *req)
DEBUG( 3, ( "rmdir %s\n", directory ) );
out:
- if (smb_dname) {
- TALLOC_FREE(smb_dname);
- }
+ TALLOC_FREE(smb_dname);
END_PROFILE(SMBrmdir);
return;
}
@@ -6301,12 +6287,8 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
}
out:
- if (smb_fname) {
- TALLOC_FREE(smb_fname);
- }
- if (smb_fname_new) {
- TALLOC_FREE(smb_fname_new);
- }
+ TALLOC_FREE(smb_fname);
+ TALLOC_FREE(smb_fname_new);
return status;
}
@@ -6871,12 +6853,8 @@ void reply_copy(struct smb_request *req)
reply_outbuf(req, 1, 0);
SSVAL(req->outbuf,smb_vwv0,count);
out:
- if (smb_fname) {
- TALLOC_FREE(smb_fname);
- }
- if (smb_fname_new) {
- TALLOC_FREE(smb_fname_new);
- }
+ TALLOC_FREE(smb_fname);
+ TALLOC_FREE(smb_fname_new);
END_PROFILE(SMBcopy);
return;
}