From: Ben Pfaff Date: Wed, 6 Jul 2011 21:22:42 +0000 (-0700) Subject: ovsdb: Fix segfault in ovsdb_file_txn_row_from_json(). X-Git-Tag: v1.1.2~17 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=dde0c4faf54836833388191b405ac2f81dda4b6c ovsdb: Fix segfault in ovsdb_file_txn_row_from_json(). If 'error' is nonnull then we destroy the row, so we must not try to reuse the row immediately after that. Support request #6155. Repoted-by: Geoff White --- diff --git a/ovsdb/file.c b/ovsdb/file.c index 605e9cba3..50c50e83e 100644 --- a/ovsdb/file.c +++ b/ovsdb/file.c @@ -333,10 +333,9 @@ ovsdb_file_txn_row_from_json(struct ovsdb_txn *txn, struct ovsdb_table *table, error = ovsdb_file_update_row_from_json(new, converting, json); if (error) { ovsdb_row_destroy(new); + } else { + ovsdb_txn_row_insert(txn, new); } - - ovsdb_txn_row_insert(txn, new); - return error; } }