Merge pull request #1807 from hxy7yx/main-1

fix(add_gtag): parser memory free
This commit is contained in:
fengzeroz
2024-01-10 17:31:35 +08:00
committed by GitHub
2 changed files with 2 additions and 8 deletions
+1 -7
View File
@@ -467,17 +467,11 @@ int neu_json_decode_gtag_json(void *json_obj, neu_json_gtag_t *gtag_p)
gtag_p->n_tag = arr.len;
gtag_p->tags = arr.tags;
goto decode_exit;
return 0;
decode_fail:
free(gtag_elems[0].v.val_str);
return -1;
decode_exit:
if (json_obj != NULL) {
neu_json_decode_free(json_obj);
}
return 0;
}
void neu_json_decode_gtag_fini(neu_json_gtag_t *gtag)
+1 -1
View File
@@ -1053,7 +1053,7 @@ class TestModbus:
node=param[0], group='group', tag=hold_string_l1[0]['name'], value='a')
api.write_tag_check(
node=param[0], group='group', tag=hold_string_l2[0]['name'], value='b')
time.sleep(0.3)
time.sleep(0.5)
assert 'a' == api.read_tag(
node=param[0], group='group', tag=hold_string_l1[0]['name'])
assert 'b' == api.read_tag(