From 271915d3877ab9d74836a986cb2eb483071f048b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 23 Mar 2010 15:38:37 -0700 Subject: [PATCH] ovsdb: Fix ovsdb-server crash when specifying nonexistent file. ovsdb_file_open__() can call (NULL) in its error exit path, but ovsdb_schema_destroy() didn't tolerate a null pointer argument. Bug #2538. --- ovsdb/ovsdb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ovsdb/ovsdb.c b/ovsdb/ovsdb.c index 5bbaddbd..45683766 100644 --- a/ovsdb/ovsdb.c +++ b/ovsdb/ovsdb.c @@ -58,6 +58,10 @@ ovsdb_schema_destroy(struct ovsdb_schema *schema) { struct shash_node *node; + if (!schema) { + return; + } + SHASH_FOR_EACH (node, &schema->tables) { ovsdb_table_schema_destroy(node->data); } -- 2.30.2