mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
ovsdb-idl: Prevent segfault destroying an incomplete transaction.
This commit is contained in:
@@ -805,6 +805,9 @@ ovsdb_idl_txn_set_dry_run(struct ovsdb_idl_txn *txn)
|
|||||||
void
|
void
|
||||||
ovsdb_idl_txn_destroy(struct ovsdb_idl_txn *txn)
|
ovsdb_idl_txn_destroy(struct ovsdb_idl_txn *txn)
|
||||||
{
|
{
|
||||||
|
if (txn->status == TXN_INCOMPLETE) {
|
||||||
|
hmap_remove(&txn->idl->outstanding_txns, &txn->hmap_node);
|
||||||
|
}
|
||||||
ovsdb_idl_txn_abort(txn);
|
ovsdb_idl_txn_abort(txn);
|
||||||
free(txn);
|
free(txn);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user