ovn-controller: Fix memory leak reported by valgrind.
Calling ovsdb_idl_set_remote() might overwrite the 'idl->session'. The patch
fixes them by freeing 'idl->session' before it is overwritten.
Testcast ovn-controller - ovn-bridge-mappings reports two definitely losts in:
xmalloc (util.c:112)
jsonrpc_session_open (jsonrpc.c:784)
ovsdb_idl_create (ovsdb-idl.c:246)
main (ovn-controller.c:384)
and,
xmalloc (util.c:112)
jsonrpc_session_open (jsonrpc.c:784)
ovsdb_idl_set_remote (ovsdb-idl.c:289)
main (ovn-controller.c:409)
Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Ryan Moats <rmoats@us.ibm.com>