summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-05-25 12:35:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:56 -0500
commitd142f4b0f28edf10b9a0f1653d2fcbf31c45b296 (patch)
treed466cf6979438effb5e1082bf2d0af52e5ec892d
parenta085d682e664ff76ec33d65c71bcbcdc99697e74 (diff)
downloadsamba-d142f4b0f28edf10b9a0f1653d2fcbf31c45b296.tar.gz
samba-d142f4b0f28edf10b9a0f1653d2fcbf31c45b296.tar.bz2
samba-d142f4b0f28edf10b9a0f1653d2fcbf31c45b296.zip
r23143: error found by valgrind
(This used to be commit 268a26131ee43a673e7b79a359b2575dcef554d5)
-rw-r--r--source4/torture/raw/lockbench.c9
-rw-r--r--source4/torture/raw/openbench.c9
2 files changed, 10 insertions, 8 deletions
diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c
index 2197ccc010..361f509c40 100644
--- a/source4/torture/raw/lockbench.c
+++ b/source4/torture/raw/lockbench.c
@@ -274,15 +274,16 @@ static void report_rate(struct event_context *ev, struct timed_event *te,
fflush(stdout);
event_add_timed(ev, state, timeval_current_ofs(1, 0), report_rate, state);
- if (!state[i].tree) {
- return;
- }
-
/* send an echo on each interface to ensure it stays alive - this helps
with IP takeover */
for (i=0;i<nprocs;i++) {
struct smb_echo p;
struct smbcli_request *req;
+
+ if (!state[i].tree) {
+ continue;
+ }
+
p.in.repeat_count = 1;
p.in.size = 0;
p.in.data = NULL;
diff --git a/source4/torture/raw/openbench.c b/source4/torture/raw/openbench.c
index b99259c618..5530e90fcf 100644
--- a/source4/torture/raw/openbench.c
+++ b/source4/torture/raw/openbench.c
@@ -314,15 +314,16 @@ static void report_rate(struct event_context *ev, struct timed_event *te,
fflush(stdout);
event_add_timed(ev, state, timeval_current_ofs(1, 0), report_rate, state);
- if (!state[i].tree) {
- return;
- }
-
/* send an echo on each interface to ensure it stays alive - this helps
with IP takeover */
for (i=0;i<nprocs;i++) {
struct smb_echo p;
struct smbcli_request *req;
+
+ if (!state[i].tree) {
+ continue;
+ }
+
p.in.repeat_count = 1;
p.in.size = 0;
p.in.data = NULL;