summaryrefslogtreecommitdiff
path: root/source3/libsmb/unexpected.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-12-19 16:48:04 +0100
committerVolker Lendecke <vl@samba.org>2007-12-19 16:57:40 +0100
commit2197801ef1d9a942c8f8ec8b8e81b9f25cffc02f (patch)
tree6f563619b67a9c300ff53e730e1358b6d2cfff07 /source3/libsmb/unexpected.c
parentcd893dd365dfe9cb49e91f4dc4a8d35533e918c2 (diff)
downloadsamba-2197801ef1d9a942c8f8ec8b8e81b9f25cffc02f.tar.gz
Zero the tdb key, there might be padding
This leads to uninitialized variable warnings if nmbd is run under valgrind. (This used to be commit 9ec4f91f35696e5a00e24fe9ae2dd06119482c80)
Diffstat (limited to 'source3/libsmb/unexpected.c')
-rw-r--r--source3/libsmb/unexpected.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/libsmb/unexpected.c b/source3/libsmb/unexpected.c
index 92a609c42b5..195668c44a8 100644
--- a/source3/libsmb/unexpected.c
+++ b/source3/libsmb/unexpected.c
@@ -63,6 +63,8 @@ void unexpected_packet(struct packet_struct *p)
len = build_packet(&buf[6], sizeof(buf)-6, p) + 6;
+ ZERO_STRUCT(key); /* needed for potential alignment */
+
key.packet_type = p->packet_type;
key.timestamp = p->timestamp;
key.count = count++;