33aa994855
spdk_rpc_get_vhost_controllers() forgot to free memory of w when ctx allocation failed. Defering the invoke of spdk_jsonrpc_begin_result(), so we can handle the failure conveniently. Change-Id: I223f5b9a918b068922d5a68c8d688331ebf90e42 Signed-off-by: wuzhouhui <wuzhouhui@kingsoft.com> Reviewed-on: https://review.gerrithub.io/425358 Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>