diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-11-25 13:12:35 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-11-29 16:00:07 +0100 |
commit | 91cb09fa0cdcdd04b2779736dd9855a5572bd0b4 (patch) | |
tree | 0eba246add514d9b69ef5aeefeb1b44f028997dd /libcli | |
parent | 9f6454af3927033d9bf1ed9e4f6cb1d748f24220 (diff) | |
download | samba-91cb09fa0cdcdd04b2779736dd9855a5572bd0b4.tar.gz samba-91cb09fa0cdcdd04b2779736dd9855a5572bd0b4.tar.bz2 samba-91cb09fa0cdcdd04b2779736dd9855a5572bd0b4.zip |
smbXcli: use talloc_stackframe() instead of talloc_tos() in smb1cli_conn_signv()
metze
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/smbXcli_base.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 16f594b9cb..e479549343 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -1118,6 +1118,7 @@ static NTSTATUS smb1cli_conn_signv(struct smbXcli_conn *conn, uint32_t *seqnum, bool one_way_seqnum) { + TALLOC_CTX *frame = NULL; uint8_t *buf; /* @@ -1141,7 +1142,9 @@ static NTSTATUS smb1cli_conn_signv(struct smbXcli_conn *conn, return NT_STATUS_INVALID_PARAMETER_MIX; } - buf = smbXcli_iov_concat(talloc_tos(), iov, iov_count); + frame = talloc_stackframe(); + + buf = smbXcli_iov_concat(frame, iov, iov_count); if (buf == NULL) { return NT_STATUS_NO_MEMORY; } @@ -1151,7 +1154,7 @@ static NTSTATUS smb1cli_conn_signv(struct smbXcli_conn *conn, smb_signing_sign_pdu(conn->smb1.signing, buf, *seqnum); memcpy(iov[1].iov_base, buf+4, iov[1].iov_len); - TALLOC_FREE(buf); + TALLOC_FREE(frame); return NT_STATUS_OK; } |