ovsdb-idl: Prevent segfault destroying an incomplete transaction.
[sliver-openvswitch.git] / lib / ovsdb-idl.c
index 409ddb0..8c1dcd8 100644 (file)
@@ -805,6 +805,9 @@ ovsdb_idl_txn_set_dry_run(struct ovsdb_idl_txn *txn)
 void
 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);
     free(txn);
 }