diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-30 18:47:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-30 18:47:00 +0000 |
commit | 03bf87dcb06f7021bfb2df2fa8691593c6148aff (patch) | |
tree | e16b06711a2ed77cafb4b7754be0220c3d14a9d7 /aclk/schema-wrappers/node_creation.cc | |
parent | Adding upstream version 1.36.1. (diff) | |
download | netdata-03bf87dcb06f7021bfb2df2fa8691593c6148aff.tar.xz netdata-03bf87dcb06f7021bfb2df2fa8691593c6148aff.zip |
Adding upstream version 1.37.0.upstream/1.37.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'aclk/schema-wrappers/node_creation.cc')
-rw-r--r-- | aclk/schema-wrappers/node_creation.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/aclk/schema-wrappers/node_creation.cc b/aclk/schema-wrappers/node_creation.cc index c696bb27b..5ad25b7e5 100644 --- a/aclk/schema-wrappers/node_creation.cc +++ b/aclk/schema-wrappers/node_creation.cc @@ -18,7 +18,7 @@ char *generate_node_instance_creation(size_t *len, const node_instance_creation_ msg.set_hops(data->hops); *len = PROTO_COMPAT_MSG_SIZE(msg); - char *bin = (char*)malloc(*len); + char *bin = (char*)mallocz(*len); if (bin) msg.SerializeToArray(bin, *len); @@ -33,7 +33,7 @@ node_instance_creation_result_t parse_create_node_instance_result(const char *da if (!msg.ParseFromArray(data, len)) return res; - res.node_id = strdup(msg.node_id().c_str()); - res.machine_guid = strdup(msg.machine_guid().c_str()); + res.node_id = strdupz(msg.node_id().c_str()); + res.machine_guid = strdupz(msg.machine_guid().c_str()); return res; } |