X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-jsonrpc.c;h=06b1cf4750dc6c71a5ce6f9b688cf0098b0ec0b1;hb=a4230dedddd1909f84947b9c6cdf88a23e10a301;hp=570ae11a839fa451996c98d64bd580001a525b70;hpb=40f0707cd9d105203c2b8b97a955b57aca426f13;p=openvswitch diff --git a/tests/test-jsonrpc.c b/tests/test-jsonrpc.c index 570ae11a..06b1cf47 100644 --- a/tests/test-jsonrpc.c +++ b/tests/test-jsonrpc.c @@ -175,7 +175,7 @@ handle_rpc(struct jsonrpc *rpc, struct jsonrpc_msg *msg, bool *done) } static void -do_listen(int argc UNUSED, char *argv[]) +do_listen(int argc OVS_UNUSED, char *argv[]) { struct pstream *pstream; struct jsonrpc **rpcs; @@ -251,11 +251,12 @@ do_listen(int argc UNUSED, char *argv[]) } poll_block(); } + free(rpcs); + pstream_close(pstream); } - static void -do_request(int argc UNUSED, char *argv[]) +do_request(int argc OVS_UNUSED, char *argv[]) { struct jsonrpc_msg *msg; struct jsonrpc *rpc; @@ -294,7 +295,7 @@ do_request(int argc UNUSED, char *argv[]) } static void -do_notify(int argc UNUSED, char *argv[]) +do_notify(int argc OVS_UNUSED, char *argv[]) { struct jsonrpc_msg *msg; struct jsonrpc *rpc; @@ -326,7 +327,7 @@ do_notify(int argc UNUSED, char *argv[]) } static void -do_help(int argc UNUSED, char *argv[] UNUSED) +do_help(int argc OVS_UNUSED, char *argv[] OVS_UNUSED) { usage(); }