Fix leaky fd issue (bug #2832)
authorMark Spencer <markster@digium.com>
Thu, 11 Nov 2004 14:40:14 +0000 (14:40 +0000)
committerMark Spencer <markster@digium.com>
Thu, 11 Nov 2004 14:40:14 +0000 (14:40 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4199 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/pbx_dundi.c

index 7aa4efb..0bc2c79 100755 (executable)
@@ -399,9 +399,11 @@ static void reset_global_eid(void)
                        if (!ioctl(s, SIOCGIFHWADDR, &ifr)) {
                                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);
+                               close(s);
                                return;
                        }
         }
+               close(s);
        }
 #else
 #if defined(ifa_broadaddr)