summaryrefslogtreecommitdiff
path: root/tools/pvresize.c
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-11-13 17:40:30 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2014-11-13 17:49:42 +0100
commit428b9fcd87d1c79cd4349c884a68de7ccac51981 (patch)
treeae4985208ac2c97872958cc9117839a40cf29338 /tools/pvresize.c
parent7278556c768ae418b03873bd5d9e921e13ce79e8 (diff)
downloadlvm2-428b9fcd87d1c79cd4349c884a68de7ccac51981.tar.gz
cleanup: validate pointers
Mostly on almost impossible to happen paths - but stay safe.
Diffstat (limited to 'tools/pvresize.c')
-rw-r--r--tools/pvresize.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/pvresize.c b/tools/pvresize.c
index 70b564dc2..631e63e0b 100644
--- a/tools/pvresize.c
+++ b/tools/pvresize.c
@@ -30,6 +30,10 @@ static int _pvresize_single(struct cmd_context *cmd,
{
struct pvresize_params *params = (struct pvresize_params *) handle;
+ if (!params) {
+ log_error(INTERNAL_ERROR "Invalid resize params.");
+ return ECMD_FAILED;
+ }
params->total++;
if (!pv_resize_single(cmd, vg, pv, params->new_size))