[lvm-devel] [PATCH 07/30] Ensure seg is nonnull
Zdenek Kabelac
zkabelac at redhat.com
Mon Oct 25 08:24:14 UTC 2010
clang Logic error Dereference of null pointer
Make sure we do not try to use NULL seg pointer.
Signed-off-by: Zdenek Kabelac <zkabelac at redhat.com>
---
lib/activate/dev_manager.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index aab0c9a..216b042 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -615,7 +615,7 @@ int dev_manager_transient(struct dev_manager *dm, struct logical_volume *lv)
if (!type || !params)
continue;
- if (seg->segtype->ops->check_transient_status &&
+ if (seg && seg->segtype->ops->check_transient_status &&
!seg->segtype->ops->check_transient_status(seg, params))
goto_out;
--
1.7.3.1
More information about the lvm-devel
mailing list