From dfdcb6e60bb6d35b2da6a01f73663ef1641e06ce Mon Sep 17 00:00:00 2001 From: eeff <33566201+eeff@users.noreply.github.com> Date: Fri, 9 Jun 2023 14:13:42 +0800 Subject: [PATCH] fix: segfault on update license request --- plugins/monitor/monitor.c | 2 ++ plugins/restful/rest.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/monitor/monitor.c b/plugins/monitor/monitor.c index 15bc4f56..271e8c69 100644 --- a/plugins/monitor/monitor.c +++ b/plugins/monitor/monitor.c @@ -409,6 +409,8 @@ static int monitor_plugin_request(neu_plugin_t * plugin, handle_events(plugin, header->type, data); break; } + case NEU_REQ_UPDATE_LICENSE: + break; default: nlog_warn("recv unsupported msg: %s", neu_reqresp_type_string(header->type)); diff --git a/plugins/restful/rest.c b/plugins/restful/rest.c index 2ff95f9a..4cff6156 100644 --- a/plugins/restful/rest.c +++ b/plugins/restful/rest.c @@ -168,7 +168,7 @@ static int dashb_plugin_request(neu_plugin_t * plugin, { (void) plugin; - if (nng_aio_get_input(header->ctx, 3)) { + if (header->ctx && nng_aio_get_input(header->ctx, 3)) { // catch all response messages for global config request handle_global_config_resp(header->ctx, header->type, data); return 0;