git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
25a7821
)
ovs-vsctl: Prevent double-free when retrying a transaction
author
Justin Pettit
<jpettit@nicira.com>
Sat, 23 Oct 2010 00:25:02 +0000
(17:25 -0700)
committer
Justin Pettit
<jpettit@nicira.com>
Tue, 26 Oct 2010 06:47:37 +0000
(23:47 -0700)
utilities/ovs-vsctl.c
patch
|
blob
|
history
diff --git
a/utilities/ovs-vsctl.c
b/utilities/ovs-vsctl.c
index
916ac65
..
9b4d9f7
100644
(file)
--- a/
utilities/ovs-vsctl.c
+++ b/
utilities/ovs-vsctl.c
@@
-2791,7
+2791,7
@@
do_vsctl(const char *args, struct vsctl_command *commands, size_t n_commands,
}
error = xstrdup(ovsdb_idl_txn_get_error(txn));
ovsdb_idl_txn_destroy(txn);
}
error = xstrdup(ovsdb_idl_txn_get_error(txn));
ovsdb_idl_txn_destroy(txn);
- the_idl_txn = NULL;
+ t
xn = t
he_idl_txn = NULL;
unused = ovsdb_symbol_table_find_unused(symtab);
if (unused) {
unused = ovsdb_symbol_table_find_unused(symtab);
if (unused) {
@@
-2882,8
+2882,10
@@
do_vsctl(const char *args, struct vsctl_command *commands, size_t n_commands,
try_again:
/* Our transaction needs to be rerun, or a prerequisite was not met. Free
* resources and return so that the caller can try again. */
try_again:
/* Our transaction needs to be rerun, or a prerequisite was not met. Free
* resources and return so that the caller can try again. */
- ovsdb_idl_txn_abort(txn);
- ovsdb_idl_txn_destroy(txn);
+ if (txn) {
+ ovsdb_idl_txn_abort(txn);
+ ovsdb_idl_txn_destroy(txn);
+ }
ovsdb_symbol_table_destroy(symtab);
for (c = commands; c < &commands[n_commands]; c++) {
ds_destroy(&c->output);
ovsdb_symbol_table_destroy(symtab);
for (c = commands; c < &commands[n_commands]; c++) {
ds_destroy(&c->output);