diff --git a/WHATS_NEW b/WHATS_NEW index 8d5a0303d..ba394a4ab 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.166 - ===================================== + Fix possible NULL pointer derefence when checking for monitoring. Add lvmreport(7) man page. Don't install lvmraid(7) man page when raid excluded. (2.02.165) Report 0% as dirty (copy%) for cache without any used block. diff --git a/lib/activate/activate.c b/lib/activate/activate.c index 997729124..69d40a0c5 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -1707,7 +1707,7 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume uint32_t s; static const struct lv_activate_opts zlaopts = { 0 }; struct lvinfo info; - const char *dso; + const char *dso = NULL; int new_unmonitor; if (!laopts) @@ -1855,7 +1855,7 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume } else { if (!monitored) log_verbose("%s already not monitored.", display_lvname(lv)); - else if (*dso) { + else if (dso && *dso) { /* * Divert unmonitor away from code that depends on the new segment * type instead of the existing one if it's changing.