netdev-port: Fix invalid memory access in netdev_vport_poll_add().
[openvswitch] / ovsdb / execution.c
index 7ce9a3f5067245abdd5aa9fb9526da4c1901b494..e2f10cbb268187e3c93f862d7ee3c7e1547e20a8 100644 (file)
@@ -103,8 +103,6 @@ ovsdb_execute(struct ovsdb *db, const struct json *params,
         || !params->u.array.n
         || params->u.array.elems[0]->type != JSON_STRING
         || strcmp(params->u.array.elems[0]->u.string, db->schema->name)) {
-        struct ovsdb_error *error;
-
         if (params->type != JSON_ARRAY) {
             error = ovsdb_syntax_error(params, NULL, "array expected");
         } else {
@@ -294,6 +292,7 @@ ovsdb_execute_insert(struct ovsdb_execution *x, struct ovsdb_parser *parser,
 
         symbol = ovsdb_symbol_table_insert(x->symtab, json_string(uuid_name));
         if (symbol->used) {
+            ovsdb_error_destroy(error);
             return ovsdb_syntax_error(uuid_name, "duplicate uuid-name",
                                       "This \"uuid-name\" appeared on an "
                                       "earlier \"insert\" operation.");