ovsdb-idl: log error in client when db schema does not exist on server
[cascardo/ovs.git] / utilities / ovs-benchmark.c
index 228af6e..ee593ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, 2012, 2013 Nicira, Inc.
+ * Copyright (c) 2010, 2011, 2012, 2013, 2015 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -399,7 +399,7 @@ cmd_rate(struct ovs_cmdl_context *ctx OVS_UNUSED)
         long long int now;
         long long int may_open;
         int delay;
-        int error;
+        int retval;
         int j;
 
         if (max_rate > 0) {
@@ -458,8 +458,8 @@ cmd_rate(struct ovs_cmdl_context *ctx OVS_UNUSED)
             delay = 1000;
         }
 
-        error = do_poll(fds, n_fds, delay);
-        if (error) {
+        retval = do_poll(fds, n_fds, delay);
+        if (retval < 0) {
             ovs_fatal(errno, "poll");
         }
 
@@ -491,6 +491,7 @@ cmd_rate(struct ovs_cmdl_context *ctx OVS_UNUSED)
             }
         }
     }
+    free(fds);
 }
 
 static void
@@ -587,10 +588,10 @@ cmd_latency(struct ovs_cmdl_context *ctx OVS_UNUSED)
         }
 
         while (n_fds > 0) {
-            int error;
+            int retval;
 
-            error = do_poll(fds, n_fds, -1);
-            if (error) {
+            retval = do_poll(fds, n_fds, -1);
+            if (retval < 0) {
                 ovs_fatal(errno, "poll");
             }