On Fri, Aug 26, 2016 at 04:15:48PM -0700, Andy Zhou wrote:
> Fix a memory leak in case of error. The error object was not properly
> disposed.  Since the error to reset DB is not expected, log it and
> exit.
> 
> Signed-off-by: Andy Zhou <az...@ovn.org>

Thanks.

Acked-by: Ben Pfaff <b...@ovn.org>

None of it actually matters, but I'd tend to fold in the following:

--8<--------------------------cut here-------------------------->8--

diff --git a/ovsdb/replication.c b/ovsdb/replication.c
index 6681a20..d3bc7c1 100644
--- a/ovsdb/replication.c
+++ b/ovsdb/replication.c
@@ -33,7 +33,7 @@
 #include "table.h"
 #include "transaction.h"
 
-VLOG_DEFINE_THIS_MODULE(replication)
+VLOG_DEFINE_THIS_MODULE(replication);
 
 static char *active_ovsdb_server;
 static struct jsonrpc *rpc;
@@ -95,10 +95,9 @@ replication_run(struct shash *all_dbs)
                 /* In case reset DB fails, log the error before exiting.  */
                 char *msg = ovsdb_error_to_string(error);
                 ovsdb_error_destroy(error);
-                VLOG_FATAL("Failed to reset DB, (%s)", msg);
-            } else {
-                reset_dbs = false;
+                VLOG_FATAL("Failed to reset DB (%s).", msg);
             }
+            reset_dbs = false;
         }
 
         /* Open JSON-RPC. */
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to