mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix use-after-free
This commit is contained in:
@@ -620,10 +620,10 @@ void dhcp_construct_contexts(time_t now)
|
|||||||
if (context->flags & CONTEXT_GC)
|
if (context->flags & CONTEXT_GC)
|
||||||
{
|
{
|
||||||
*up = context->next;
|
*up = context->next;
|
||||||
free(context);
|
|
||||||
param.newone = 1; /* include deletion */
|
param.newone = 1; /* include deletion */
|
||||||
if (context->flags & CONTEXT_RA_NAME)
|
if (context->flags & CONTEXT_RA_NAME)
|
||||||
param.newname = 1;
|
param.newname = 1;
|
||||||
|
free(context);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
up = &context->next;
|
up = &context->next;
|
||||||
|
|||||||
Reference in New Issue
Block a user