summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-08-05 17:10:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:26 -0500
commit3dae794632f48ae163d1195fef19c14e67f341cc (patch)
tree6529995a75fb6370eadb634b8d11aec3686a4b86 /source3/smbd/process.c
parent30865196bf08fa7a8cda8e7305b911067fb84fab (diff)
downloadsamba-3dae794632f48ae163d1195fef19c14e67f341cc.tar.gz
samba-3dae794632f48ae163d1195fef19c14e67f341cc.tar.bz2
samba-3dae794632f48ae163d1195fef19c14e67f341cc.zip
r9126: Fix valgrind bug Volker found in interaction with new aio buffer
flipping and oplocks. Jeremy. (This used to be commit a18c5ff3eada93e46da3f7cbd326b8dceb72e147)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 19add7e095..1deb4da269 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1527,6 +1527,7 @@ char *get_InBuffer(void)
void set_InBuffer(char *new_inbuf)
{
InBuffer = new_inbuf;
+ current_inbuf = InBuffer;
}
char *get_OutBuffer(void)
@@ -1547,6 +1548,9 @@ void set_OutBuffer(char *new_outbuf)
void free_InBuffer(char *inbuf)
{
if (!aio_inbuffer_in_use(inbuf)) {
+ if (current_inbuf == inbuf) {
+ current_inbuf = NULL;
+ }
SAFE_FREE(inbuf);
}
}