master - libdm: abort filemap update if pool allocation fails (coverity)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f86c1f5d0a38afc9d174e59af4bab83127e4b2b8 Commit: f86c1f5d0a38afc9d174e59af4bab83127e4b2b8 Parent: bc5d67884fd489682c0267002474e9089e368fe2 Author: Bryn M. Reeves <[email protected]> AuthorDate: Wed Mar 29 17:39:31 2017 +0100 Committer: Bryn M. Reeves <[email protected]> CommitterDate: Wed Mar 29 18:34:38 2017 +0100
libdm: abort filemap update if pool allocation fails (coverity)
--- libdm/libdm-stats.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
libdm/libdm-stats.c +3 -2
@@ -4540,8 +4540,9 @@ static int _stats_unmap_regions(struct dm_stats *dms, uint64_t group_id, ext.id = i; nr_kept++; -dm_pool_grow_object (mem, &ext, -sizeof (ext)); +if (!dm_pool_grow_object (mem, &ext,sizeof (ext))) + goto out; +log_very_verbose ("Kept region " FMTu64, i); }else {