-/* Copyright (c) 2009 Nicira Networks
+/* Copyright (c) 2009, 2010 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
&& timeout_msec) {
ovsdb_txn_abort(x.txn);
*timeout_msec = x.timeout_msec;
- ovsdb_error_destroy(error);
+
+ json_destroy(result);
json_destroy(results);
- return NULL;
+ results = NULL;
+ goto exit;
}
/* Add result to array. */
json_array_add(results, json_null_create());
}
+exit:
ovsdb_error_destroy(error);
ovsdb_symbol_table_destroy(x.symtab);
static void
ovsdb_jsonrpc_session_close(struct ovsdb_jsonrpc_session *s)
{
+ ovsdb_jsonrpc_monitor_remove_all(s);
jsonrpc_session_close(s->js);
list_remove(&s->node);
s->remote->server->n_sessions--;
+ free(s);
}
static int
ovsdb_jsonrpc_trigger_create(s, request->id, request->params);
request->id = NULL;
request->params = NULL;
+ jsonrpc_msg_destroy(request);
return NULL;
}
-/* Copyright (c) 2009 Nicira Networks
+/* Copyright (c) 2009, 2010 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
error = ovsdb_schema_from_json(json, &schema);
+ json_destroy(json);
if (error) {
- json_destroy(json);
return ovsdb_wrap_error(error,
"failed to parse \"%s\" as ovsdb schema",
file_name);
} else {
txn_table = ovsdb_txn_get_txn_table(txn, table);
hmap_remove(&txn_table->txn_rows, &txn_row->hmap_node);
+ free(txn_row);
}
ovsdb_row_destroy(row);
}