summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-02 11:31:48 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-03 04:35:06 +0100
commitf3c849fbcc9833987b6da2d4cb837bcc96e79d28 (patch)
tree53c11bde48ab95aa498d5ba8972b50bb42a77f74 /sal/osl
parentc04fde0063276e3d5a6de3e077c1c822ed1ad25e (diff)
coverity#983100: close resource handle
Change-Id: I7e637fcafff08e4299a90887dbcfc60613377c9d
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/unx/util.c3
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);