From: Ben Pfaff Date: Wed, 18 Nov 2009 19:32:16 +0000 (-0800) Subject: ovsdb-server: Fix crash for invalid parameters to "monitor" request. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23f37a975e4a4367867a0a0a5c8e0df8b2664d0c;p=openvswitch ovsdb-server: Fix crash for invalid parameters to "monitor" request. Thanks to Jeremy Stribling for reporting the problem. --- 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);