[ovs-dev] [PATCH 2/2] ovs-vsctl: Fix a segfault.

Gurucharan Shetty shettyg at nicira.com
Wed Apr 10 19:00:53 UTC 2013


The following two commands results in a ovs-vsctl segfault.
ovs-vsctl -vfatal_signal:off --timeout=0 wait-until \
Open_vswitch . external_ids:blah="1"
/etc/init.d/openvswitch-switch restart

This patch fixes the segfault by properly setting the global
varibale, the_idl_txn to NULL when the underlying memory is
freed.

Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 utilities/ovs-vsctl.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c
index 18ace60..aed90fd 100644
--- a/utilities/ovs-vsctl.c
+++ b/utilities/ovs-vsctl.c
@@ -4105,6 +4105,7 @@ try_again:
     if (txn) {
         ovsdb_idl_txn_abort(txn);
         ovsdb_idl_txn_destroy(txn);
+        the_idl_txn = NULL;
     }
     ovsdb_symbol_table_destroy(symtab);
     for (c = commands; c < &commands[n_commands]; c++) {
-- 
1.7.9.5




More information about the dev mailing list