[ovs-dev] [PATCH 02/15] ovsdb: Fix ovsdb-server crash when specifying nonexistent file.
Ben Pfaff
blp at nicira.com
Wed Mar 24 20:18:05 UTC 2010
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 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/ovsdb/ovsdb.c b/ovsdb/ovsdb.c
index 5bbaddb..4568376 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);
}
--
1.6.6.1
More information about the dev
mailing list