From: Ben Pfaff Date: Sat, 12 Dec 2009 00:58:16 +0000 (-0800) Subject: ovsdb-idl: Prevent segfault destroying an incomplete transaction. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbd8fd40a33fa96060b4dffd911e04555f8771d4;p=openvswitch ovsdb-idl: Prevent segfault destroying an incomplete transaction. --- diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 409ddb0d..8c1dcd8f 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -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); }