mirror of
https://github.com/emqx/neuron.git
synced 2026-10-24 10:46:39 +08:00
Merge pull request #1201 from eeff/eeff/2.4
fix(restful): global config json parsing on empty array
This commit is contained in:
@@ -105,9 +105,6 @@ int neu_json_decode_global_config_req_tags(
|
||||
}
|
||||
|
||||
req->n_tag = json_array_size(tag_array);
|
||||
if (req->n_tag <= 0) {
|
||||
goto decode_fail;
|
||||
}
|
||||
|
||||
req->tags = calloc(req->n_tag, sizeof(*req->tags));
|
||||
if (NULL == req->tags) {
|
||||
|
||||
@@ -311,9 +311,6 @@ int neu_json_decode_get_driver_group_resp_json(
|
||||
}
|
||||
|
||||
resp->n_group = json_array_size(grp_array);
|
||||
if (resp->n_group <= 0) {
|
||||
goto decode_fail;
|
||||
}
|
||||
|
||||
resp->groups = calloc(resp->n_group, sizeof(*resp->groups));
|
||||
if (NULL == resp->groups) {
|
||||
|
||||
Reference in New Issue
Block a user