summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_pipe.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-07-09 00:13:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:11 -0500
commitcd87b3b972b39003def69671d8a3c6aaf51afd50 (patch)
tree5dea6dd05794a34aab112f41a81c51f5fc9715b3 /source3/rpc_server/srv_pipe.c
parentd4ac326d46faab010eeeb24c893ab13bbbf0337e (diff)
downloadsamba-cd87b3b972b39003def69671d8a3c6aaf51afd50.tar.gz
samba-cd87b3b972b39003def69671d8a3c6aaf51afd50.tar.bz2
samba-cd87b3b972b39003def69671d8a3c6aaf51afd50.zip
r1414: Memory leak fixes found by valgrind whilst checking the password history code.
Error code paths were not freeing up some memory. Jeremy. (This used to be commit 7c4666e56c2c281e023c6483459cb9e8d4787d36)
Diffstat (limited to 'source3/rpc_server/srv_pipe.c')
-rw-r--r--source3/rpc_server/srv_pipe.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 36929150e5..2232f0bc24 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -52,28 +52,28 @@ struct dcinfo last_dcinfo;
static void NTLMSSPcalc_p( pipes_struct *p, unsigned char *data, int len)
{
- unsigned char *hash = p->ntlmssp_hash;
- unsigned char index_i = hash[256];
- unsigned char index_j = hash[257];
- int ind;
+ unsigned char *hash = p->ntlmssp_hash;
+ unsigned char index_i = hash[256];
+ unsigned char index_j = hash[257];
+ int ind;
- for( ind = 0; ind < len; ind++) {
- unsigned char tc;
- unsigned char t;
+ for( ind = 0; ind < len; ind++) {
+ unsigned char tc;
+ unsigned char t;
- index_i++;
- index_j += hash[index_i];
+ index_i++;
+ index_j += hash[index_i];
- tc = hash[index_i];
- hash[index_i] = hash[index_j];
- hash[index_j] = tc;
+ tc = hash[index_i];
+ hash[index_i] = hash[index_j];
+ hash[index_j] = tc;
- t = hash[index_i] + hash[index_j];
- data[ind] = data[ind] ^ hash[t];
- }
+ t = hash[index_i] + hash[index_j];
+ data[ind] = data[ind] ^ hash[t];
+ }
- hash[256] = index_i;
- hash[257] = index_j;
+ hash[256] = index_i;
+ hash[257] = index_j;
}
/*******************************************************************