Commit 6f13e538 authored by Simon Kelley's avatar Simon Kelley

Tidy up malloc-failure handling.

parent d1c759c5
......@@ -266,10 +266,13 @@ static int iface_allowed(struct irec **irecp, int if_index,
iface->dad = dad;
iface->done = 0;
if ((iface->name = whine_malloc(strlen(ifr.ifr_name)+1)))
strcpy(iface->name, ifr.ifr_name);
iface->next = *irecp;
*irecp = iface;
return 1;
{
strcpy(iface->name, ifr.ifr_name);
iface->next = *irecp;
*irecp = iface;
return 1;
}
free(iface);
}
errno = ENOMEM;
......
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