From 6bd3864b41fa1cb8e2763185ff860d320c45930f Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 5 Jun 2012 14:55:00 +0200 Subject: [PATCH] thin: fix lvconvert error path NULL dereference For printing the name, use given command line parameter. --- WHATS_NEW | 1 + tools/lvconvert.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index f1216ff2b..90157c83f 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.97 - =============================== + Fix lvconvert error path NULL pointer dereference. Check for create_instance() fail in pvscan_lvmetad_single(). Use 64bit math for reserved memory and stack. Add tests for kernel_send() errors in cmirrod. diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 39e196b43..074821d0d 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -1841,8 +1841,8 @@ static int _lvconvert_thinpool(struct cmd_context *cmd, lp->pool_data_lv_name); if (!pool_lv) { - log_error("Can't find pool logical volume %s.", pool_lv->name); - goto_out; + log_error("Can't find pool logical volume %s.", lp->lv_name); + return 0; } if ((pool_lv != metadata_lv)) {