git://sourceware.org
/
lvm2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eacd3a0
)
Ensure we always have origin defined
author
Zdenek Kabelac
<zkabelac@redhat.com>
Mon, 25 Oct 2010 12:05:46 +0000
(12:05 +0000)
committer
Zdenek Kabelac
<zkabelac@redhat.com>
Mon, 25 Oct 2010 12:05:46 +0000
(12:05 +0000)
Reported by clang as: Logic error Dereference of null pointer
Make sure the code path could not use NULL origin because of some internal
code error.
tools/lvcreate.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/lvcreate.c
b/tools/lvcreate.c
index de5b59cfb6d0bb7139e1918660da9f9e2c272875..a9e3c2d8f8d61d5eaa24712ea1f91346d723320f 100644
(file)
--- a/
tools/lvcreate.c
+++ b/
tools/lvcreate.c
@@
-179,6
+179,10
@@
static int _update_extents_params(struct volume_group *vg,
lp->origin);
return 0;
}
+ if (!origin) {
+ log_error(INTERNAL_ERROR "Couldn't find origin volume.");
+ return 0;
+ }
lp->extents = lp->extents * origin->le_count / 100;
break;
case PERCENT_NONE:
This page took
0.04384 seconds
and
5
git commands to generate.