Skip to content

Commit baf8ccb

Browse files
authored
Fix uninitialized vnode stale timeout field in pluginsd parser (netdata#21983)
Initialize `node_stale_after_seconds` field in `pluginsd_parser`
1 parent 8329088 commit baf8ccb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/plugins.d/pluginsd_parser.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ static void pluginsd_host_define_cleanup(PARSER *parser) {
125125
parser->user.host_define.hostname = NULL;
126126
parser->user.host_define.rrdlabels = NULL;
127127
parser->user.host_define.parsing_host = false;
128+
parser->user.host_define.node_stale_after_seconds = 0;
128129
}
129130

130131
static inline bool pluginsd_validate_machine_guid(const char *guid, nd_uuid_t *uuid, char *output) {
@@ -153,6 +154,7 @@ static inline PARSER_RC pluginsd_host_define(char **words, size_t num_words, PAR
153154
parser->user.host_define.hostname = string_strdupz(hostname);
154155
parser->user.host_define.rrdlabels = rrdlabels_create();
155156
parser->user.host_define.parsing_host = true;
157+
parser->user.host_define.node_stale_after_seconds = 0;
156158

157159
return PARSER_RC_OK;
158160
}

0 commit comments

Comments
 (0)