We want ovsdb_create() (and thus, the open database) to receive the file
only if it is a read-write database. If it is read-only, then there is
no need to keep the file around, since we will never read or write it
after opening the database.
}
json_destroy(json);
- db = ovsdb_create(read_only ? file : NULL, schema);
+ db = ovsdb_create(read_only ? NULL : file, schema);
while ((error = ovsdb_file_read(file, &json)) == NULL && json) {
struct ovsdb_txn *txn;