bsd: Add missing null-pointer check.

Found by: Coverity scan.
This commit is contained in:
Vladimir Serbinenko 2015-01-26 09:42:42 +01:00
parent 49978c5c4f
commit 1e0d718371

View file

@ -234,7 +234,8 @@ grub_bsd_add_meta_ptr (grub_uint32_t type, void **ptr, grub_uint32_t len)
{ {
struct bsd_tag *p; struct bsd_tag *p;
for (p = tags; for (p = tags;
p->type != (FREEBSD_MODINFO_METADATA | FREEBSD_MODINFOMD_KERNEND); p && p->type != (FREEBSD_MODINFO_METADATA
| FREEBSD_MODINFOMD_KERNEND);
p = p->next); p = p->next);
if (p) if (p)