2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-17 14:28:02 +00:00

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 <gwhite@nicira.com>
This commit is contained in:
Ben Pfaff
2011-07-06 14:22:42 -07:00
parent 2bed68ff28
commit 3697c0626f

View File

@@ -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;
}
}