0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-26 13:54:48 +00:00

Fixed locking order to address CID_362348 ()

This commit is contained in:
Stelios Fragkakis 2020-09-25 16:19:41 +03:00 committed by GitHub
parent 2035343d16
commit ed0546b32e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,12 +45,12 @@ void build_context_param_list(struct context_param **param_list, RRDSET *st)
}
RRDDIM *rd1;
rrdset_rdlock(st);
st->last_accessed_time = now_realtime_sec();
(*param_list)->first_entry_t = MIN((*param_list)->first_entry_t, rrdset_first_entry_t(st));
(*param_list)->last_entry_t = MAX((*param_list)->last_entry_t, rrdset_last_entry_t(st));
st->last_accessed_time = now_realtime_sec();
rrdset_rdlock(st);
rrddim_foreach_read(rd1, st) {
RRDDIM *rd = mallocz(rd1->memsize);
memcpy(rd, rd1, rd1->memsize);