From 33b0957d838b348e9459ed5b988cf59344a0d41c Mon Sep 17 00:00:00 2001 From: Syed Ibrahim M Date: Tue, 5 Jun 2012 17:59:45 +0530 Subject: Fixed the BTIF_HL to exit the select thread and close the signal FDs when cleanup() is called. This stops the signal FDs to be leaked for every BT on/off cycle Closed the open FDs in univ_linux.c to stop FD leaks during BT on/off cycles Change-Id: I86af438dc1186e12aa1f18fd44bcc89343ef5489 --- udrv/ulinux/unv_linux.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'udrv') diff --git a/udrv/ulinux/unv_linux.c b/udrv/ulinux/unv_linux.c index 2f58265..75e61c1 100755 --- a/udrv/ulinux/unv_linux.c +++ b/udrv/ulinux/unv_linux.c @@ -657,13 +657,17 @@ int unv_read_key_iter( const char *path, if (fstat(fd, &st) != 0) { error("stat failed (%s)", strerror(errno)); + close(fd); return -1; } p_buf = malloc(st.st_size + 1); if (!p_buf) + { + close(fd); return -1; + } p = p_buf; @@ -671,6 +675,7 @@ int unv_read_key_iter( const char *path, { error("read failed %s", strerror(errno)); free(p_buf); + close(fd); return -1; } -- cgit v1.1