From: Ben Pfaff Date: Fri, 11 Dec 2009 21:16:15 +0000 (-0800) Subject: ovsdb-idl: Fix deletion of modified row. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ebeed630c561949cfa86b88dc935e20d7e9fc95;p=openvswitch ovsdb-idl: Fix deletion of modified row. If the transaction modified a row and then deleted it, the IDL would instead mistakenly leave the row entirely untouched. This commit fixes this bug. It needs a regression test, but this commit does not add one. --- diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 98ec3dd5..409ddb0d 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -1141,11 +1141,8 @@ ovsdb_idl_txn_delete(struct ovsdb_idl_row *row) hmap_insert(&row->table->idl->txn->txn_rows, &row->txn_node, uuid_hash(&row->uuid)); } - if (row->new == row->old) { - row->new = NULL; - } else { - ovsdb_idl_row_clear_new(row); - } + ovsdb_idl_row_clear_new(row); + row->new = NULL; } struct ovsdb_idl_row *