Commit 4ead40cf authored by Simon Kelley's avatar Simon Kelley

Fix use-after-free

parent 04a0612e
......@@ -620,10 +620,10 @@ void dhcp_construct_contexts(time_t now)
if (context->flags & CONTEXT_GC)
{
*up = context->next;
free(context);
param.newone = 1; /* include deletion */
if (context->flags & CONTEXT_RA_NAME)
param.newname = 1;
param.newname = 1;
free(context);
}
else
up = &context->next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment