From: Gurucharan Shetty Date: Wed, 10 Apr 2013 18:55:06 +0000 (-0700) Subject: ovs-vsctl: Fix a segfault. X-Git-Tag: v1.10.0~9 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=6ec25c4c3fc5c9f69eae4af6adbe06a3f1993e10 ovs-vsctl: Fix a segfault. 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 --- diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 18ace60a7..aed90fd79 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++) {