From 23f37a975e4a4367867a0a0a5c8e0df8b2664d0c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 18 Nov 2009 11:32:16 -0800 Subject: [PATCH] ovsdb-server: Fix crash for invalid parameters to "monitor" request. Thanks to Jeremy Stribling for reporting the problem. --- ovsdb/jsonrpc-server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ovsdb/jsonrpc-server.c b/ovsdb/jsonrpc-server.c index fc8b194e..4644970d 100644 --- a/ovsdb/jsonrpc-server.c +++ b/ovsdb/jsonrpc-server.c @@ -714,7 +714,9 @@ ovsdb_jsonrpc_monitor_create(struct ovsdb_jsonrpc_session *s, return ovsdb_jsonrpc_monitor_get_initial(m); error: - ovsdb_remove_replica(s->server->db, &m->replica); + if (m) { + ovsdb_remove_replica(s->server->db, &m->replica); + } json = ovsdb_error_to_json(error); ovsdb_error_destroy(error); -- 2.30.2