From e8bed35ddf264c67c44b9cf9cedef6b078bfd710 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Wed, 8 Dec 2010 19:26:35 +0000 Subject: [PATCH] Cope better with an undefined target_percent operation in _percent_run. --- WHATS_NEW | 3 ++- lib/activate/dev_manager.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 1544174fb..86b0a865c 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,6 +1,7 @@ Version 2.02.79 - =================================== - Fix write to released memory in vg_relase(). (2.02.78) + Cope better with an undefined target_percent operation in _percent_run. + Fix write to released memory in vg_release(). (2.02.78) Version 2.02.78 - 6th December 2010 =================================== diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index a58b7c5d5..2a72bb2da 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -507,8 +507,10 @@ static int _percent_run(struct dev_manager *dm, const char *name, continue; } - if (segtype->ops->target_percent && - !segtype->ops->target_percent(&dm->target_state, + if (!segtype->ops->target_percent) + continue; + + if (!segtype->ops->target_percent(&dm->target_state, &percent, dm->mem, dm->cmd, seg, params, &total_numerator,