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; }