1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: ensure buffer is initialized

This commit is contained in:
Zdenek Kabelac 2021-03-09 16:12:38 +01:00
parent 8a03675241
commit f7912635a0
2 changed files with 3 additions and 0 deletions

View File

@ -1141,6 +1141,8 @@ int config_def_check(struct cft_check_handle *handle)
* sections and settings with full path as a key.
* If section name is variable, use '#' as a substitute.
*/
*vp = 0;
*rp = 0;
if (!handle->cmd->cft_def_hash) {
if (!(handle->cmd->cft_def_hash = dm_hash_create(60))) {
log_error("Failed to create configuration definition hash.");

View File

@ -5158,6 +5158,7 @@ static int _stats_group_segments(struct dm_stats *dms, uint64_t *region_ids,
return 0;
}
*regions = 0;
for (i = 0; i < count; i++) {
/*
* We don't expect large numbers of segments (compared to e.g.