setarch: avoid NULL dereference [coverity check]
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
d3149a8556
commit
cf5debba06
|
@ -246,7 +246,7 @@ static struct arch_domain *get_arch_domain(struct arch_domain *doms, const char
|
||||||
{
|
{
|
||||||
struct arch_domain *d;
|
struct arch_domain *d;
|
||||||
|
|
||||||
for (d = doms; d->perval >= 0; d++) {
|
for (d = doms; d && d->perval >= 0; d++) {
|
||||||
if (!strcmp(pers, d->target_arch))
|
if (!strcmp(pers, d->target_arch))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue