Fix un-initialised "used" field in --listen-address structure.

Also remove unused "isloop" field.
This commit is contained in:
Simon Kelley
2012-06-14 11:50:45 +01:00
parent 8b3ae2fd43
commit 4ce4f3779b
3 changed files with 6 additions and 8 deletions

View File

@@ -207,17 +207,14 @@ static int iface_allowed(struct irec **irecp, int if_index,
struct iname *lo;
for (lo = daemon->if_names; lo; lo = lo->next)
if (lo->name && strcmp(lo->name, ifr.ifr_name) == 0)
{
lo->isloop = 1;
break;
}
break;
if (!lo &&
(lo = whine_malloc(sizeof(struct iname))) &&
(lo->name = whine_malloc(strlen(ifr.ifr_name)+1)))
{
strcpy(lo->name, ifr.ifr_name);
lo->isloop = lo->used = 1;
lo->used = 1;
lo->next = daemon->if_names;
daemon->if_names = lo;
}