r23143: error found by valgrind
authorAndrew Tridgell <tridge@samba.org>
Fri, 25 May 2007 12:35:03 +0000 (12:35 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:52:56 +0000 (14:52 -0500)
(This used to be commit 268a26131ee43a673e7b79a359b2575dcef554d5)

source4/torture/raw/lockbench.c
source4/torture/raw/openbench.c

index 2197ccc0100756081dbf1829c624bde164394d0a..361f509c4046ebfe18c9b673f1c230c8749acad3 100644 (file)
@@ -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;
index b99259c618a081b3d5b07019085c4528874a71b4..5530e90fcf66f0f22d6f9e28f21ace08de03bbdb 100644 (file)
@@ -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;