Fix leaky fd issue (bug #2832)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4199 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
70e880faa3
commit
cd7ffe7913
|
@ -399,9 +399,11 @@ static void reset_global_eid(void)
|
||||||
if (!ioctl(s, SIOCGIFHWADDR, &ifr)) {
|
if (!ioctl(s, SIOCGIFHWADDR, &ifr)) {
|
||||||
memcpy(&global_eid, ((unsigned char *)&ifr.ifr_hwaddr) + 2, sizeof(global_eid));
|
memcpy(&global_eid, ((unsigned char *)&ifr.ifr_hwaddr) + 2, sizeof(global_eid));
|
||||||
ast_log(LOG_DEBUG, "Seeding global EID '%s' from '%s'\n", dundi_eid_to_str(eid_str, sizeof(eid_str), &global_eid), ifr.ifr_name);
|
ast_log(LOG_DEBUG, "Seeding global EID '%s' from '%s'\n", dundi_eid_to_str(eid_str, sizeof(eid_str), &global_eid), ifr.ifr_name);
|
||||||
|
close(s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
close(s);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#if defined(ifa_broadaddr)
|
#if defined(ifa_broadaddr)
|
||||||
|
|
Reference in New Issue