mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Test seg pointer for non-null
As the function accepts NULL for 'seg' parameter, check for it before dereference.
This commit is contained in:
parent
0c35eb915c
commit
e1153fd385
@ -1,5 +1,6 @@
|
||||
Version 2.02.94 -
|
||||
====================================
|
||||
====================================
|
||||
Test seg pointer for non-null it in raid_target_percent error path.
|
||||
Check for errors in _init_tags() during config loading.
|
||||
Always check result of _set_vg_name() in lvcreate.
|
||||
Drop unused call to uname() during clvmd initialization.
|
||||
|
@ -230,7 +230,7 @@ static int _raid_target_percent(void **target_state,
|
||||
if (!pos || (sscanf(pos, "%" PRIu64 "/%" PRIu64 "%n",
|
||||
&numerator, &denominator, &i) != 2)) {
|
||||
log_error("Failed to parse %s status fraction: %s",
|
||||
seg->segtype->name, params);
|
||||
(seg) ? seg->segtype->name : "segment", params);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user