mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 06:30:35 +00:00
search: fix use after free
Found by: Coverity scan. CID: 96715
This commit is contained in:
parent
72ccf92c39
commit
0fb886cde9
@ -210,10 +210,10 @@ try (struct search_ctx *ctx)
|
|||||||
/* Cache entry was outdated. Remove it. */
|
/* Cache entry was outdated. Remove it. */
|
||||||
if (!ctx->count)
|
if (!ctx->count)
|
||||||
{
|
{
|
||||||
|
*prev = cache_ent->next;
|
||||||
grub_free (cache_ent->key);
|
grub_free (cache_ent->key);
|
||||||
grub_free (cache_ent->value);
|
grub_free (cache_ent->value);
|
||||||
grub_free (cache_ent);
|
grub_free (cache_ent);
|
||||||
*prev = cache_ent->next;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user