+29
−35
Loading
There're outstanding requests in spdk_jsonrpc_parse_request which caused by connection close. There are methods to call spdk_jsonrpc_server_conn_close, including spdk_jsonrpc_server_conn_remove and spdk_jsonrpc_server_shutdown, Some rpc methods call these functions to terminate connections ,that leads to memory leaks. Try to free outstanding requests after deciding to terminate a connection. And do this follwing with close(conn->sockfd). Fix issue #784, and can resolve other similar memory leaks about this. Signed-off-by:yidong0635 <dongx.yi@intel.com> Change-Id: Icd287bd0c5670ee8ec32750b999f82b0fa89cf84 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458438 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Changpeng Liu <changpeng.liu@intel.com> Reviewed-by:
Darek Stojaczyk <dariusz.stojaczyk@intel.com>