1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

coverity: ensure non-null pointers are used

Here is too complex for Coverity to guess
those pointers cannot be NULL, but it's
very easy to add little checks here.
This commit is contained in:
Zdenek Kabelac 2016-02-23 20:16:06 +01:00
parent 9b92cb2760
commit 68955a8102

View File

@ -352,7 +352,8 @@ static int _ignore_blocked_mirror_devices(struct device *dev,
do {
next = dm_get_next_target(dmt, next, &s, &l,
&target_type, &params);
if ((s == start) && (l == length)) {
if ((s == start) && (l == length) &&
target_type && params) {
if (strcmp(target_type, "mirror"))
goto_out;