]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r23143: error found by valgrind
authorAndrew Tridgell <tridge@samba.org>
Fri, 25 May 2007 12:35:03 +0000 (12:35 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 25 May 2007 12:35:03 +0000 (12:35 +0000)
source/torture/raw/lockbench.c
source/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;