From d21131f584787583c0a09512c8d826a9e9cec7bf Mon Sep 17 00:00:00 2001 From: "xiang.zhou" Date: Fri, 29 Nov 2024 13:22:30 +0800 Subject: [PATCH] ekuiper:check encode json str --- plugins/ekuiper/read_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ekuiper/read_write.c b/plugins/ekuiper/read_write.c index 4ddced85..11d13807 100644 --- a/plugins/ekuiper/read_write.c +++ b/plugins/ekuiper/read_write.c @@ -112,7 +112,7 @@ void send_data(neu_plugin_t *plugin, neu_reqresp_trans_data_t *trans_data) do { rv = neu_json_encode_by_fn(&resp, json_encode_read_resp, &json_str); - if (0 != rv) { + if (0 != rv || json_str == NULL) { plog_error(plugin, "fail encode trans data to json"); break; }