ovsdb: Always set *dbp to null on failure in ovsdb_file_open__().
authorBen Pfaff <blp@nicira.com>
Tue, 16 Mar 2010 19:42:40 +0000 (12:42 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 18 Mar 2010 18:23:50 +0000 (11:23 -0700)
Found via inspection.  I do not know that this fixes a real bug.

ovsdb/file.c

index c61d5caa63b32c98ee6871b927d313e4398bec7b..0c842727461f45e9bc6392bd79c89ad1a8ca8e58 100644 (file)
@@ -111,6 +111,7 @@ ovsdb_file_open__(const char *file_name,
     struct json *json;
     struct ovsdb *db;
 
+    *dbp = NULL;
     open_mode = read_only ? OVSDB_LOG_READ_ONLY : OVSDB_LOG_READ_WRITE;
     error = ovsdb_log_open(file_name, open_mode, -1, &log);
     if (error) {