mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:45:07 -05:00
sources: add assertion for instance index
This commit is contained in:
@@ -296,6 +296,9 @@ void SRC_DestroyInstance(SRC_Instance instance)
|
||||
int dead_index, i;
|
||||
|
||||
assert(initialised);
|
||||
if (instance->index < 0 || instance->index >= n_sources ||
|
||||
instance != sources[instance->index])
|
||||
assert(0);
|
||||
|
||||
SST_DeleteInstance(instance->stats);
|
||||
dead_index = instance->index;
|
||||
|
||||
Reference in New Issue
Block a user