diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-02 11:31:48 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-03 04:35:06 +0100 |
commit | f3c849fbcc9833987b6da2d4cb837bcc96e79d28 (patch) | |
tree | 53c11bde48ab95aa498d5ba8972b50bb42a77f74 /sal/osl | |
parent | coverity#983099: fix memory leak (diff) | |
download | core-f3c849fbcc9833987b6da2d4cb837bcc96e79d28.tar.gz core-f3c849fbcc9833987b6da2d4cb837bcc96e79d28.zip |
coverity#983100: close resource handle
Change-Id: I7e637fcafff08e4299a90887dbcfc60613377c9d
Diffstat (limited to 'sal/osl')
-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); |