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

lv_manip: do not deref NULL for debug message

Coverity: when 'pv2' would be passed as NULL, do not try to
deref it in debug message.
This commit is contained in:
Zdenek Kabelac 2015-11-09 09:28:59 +01:00
parent fa1d730847
commit 856e11e11c
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.135 -
====================================
Do not deref NULL pointer in debug message for _match_pv_tags().
Drop unneeded stat() call when checking for sysfs file.
Fix memory leak on error path of failing thin-pool percentage check.
Add missing test for failing node allocation in lvmetad.

View File

@ -2114,7 +2114,7 @@ static int _match_pv_tags(const struct dm_config_node *cling_tag_list_cn,
else {
if (!pv_tags)
log_debug_alloc("Matched allocation PV tag %s on existing %s with free space on %s.",
tag_matched, pv_dev_name(pv1), pv_dev_name(pv2));
tag_matched, pv_dev_name(pv1), pv2 ? pv_dev_name(pv2) : "-");
else
log_debug_alloc("Eliminating allocation area %" PRIu32 " at PV %s start PE %" PRIu32
" from consideration: PV tag %s already used.",