[ovs-dev] [PATCH 02/15] ovsdb: Fix ovsdb-server crash when specifying nonexistent file.

Justin Pettit jpettit at nicira.com
Wed Mar 24 23:24:14 UTC 2010


Looks good.

--Justin


On Mar 24, 2010, at 1:18 PM, Ben Pfaff wrote:

> 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
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list