mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-27 09:39:22 +00:00
bsd: Add missing null-pointer check.
Found by: Coverity scan.
This commit is contained in:
1 parent
49978c5c4f
commit
1e0d718371
1 file changed
+2
-1
@@ -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)
|
||||||
|
|||||||
Reference in new issue
Block a user