diff options
author | Ben Pfaff <blp@nicira.com> | 2011-07-06 14:22:42 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-07-06 14:22:42 -0700 |
commit | 3697c0626f338f4dbeb69cdb08b84f79980acaad (patch) | |
tree | 827fc2f855d2b0ffee0da41c1befd25e2229fdc2 /ovsdb | |
parent | 2bed68ff28f525b2153131df64976d4aea2b3aa0 (diff) |
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>
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ovsdb/file.c b/ovsdb/file.c index 9eea460d..05a4067a 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; } } |