diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c index dca2963d8dba..6118a5f37642 100644 --- a/sal/osl/unx/util.c +++ b/sal/osl/unx/util.c @@ -122,7 +122,10 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr) int so = socket(AF_INET, SOCK_DGRAM, 0); if (strlen(ifname) >= sizeof(ifr.ifr_name)) + { + close(so); return 0; + } strcpy(ifr.ifr_name, ifname); |