summaryrefslogtreecommitdiffstats
path: root/udrv
diff options
context:
space:
mode:
authorSyed Ibrahim M <syedibra@broadcom.com>2012-06-05 17:59:45 +0530
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:22 -0700
commit33b0957d838b348e9459ed5b988cf59344a0d41c (patch)
treee18d6e87c632716a4d342fa57428b946fdef32cb /udrv
parent6bc6378d9fa5f2bbb07d0b79dad7ccd2dc68f8b1 (diff)
downloadexternal_bluetooth_bluedroid-33b0957d838b348e9459ed5b988cf59344a0d41c.zip
external_bluetooth_bluedroid-33b0957d838b348e9459ed5b988cf59344a0d41c.tar.gz
external_bluetooth_bluedroid-33b0957d838b348e9459ed5b988cf59344a0d41c.tar.bz2
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
Diffstat (limited to 'udrv')
-rwxr-xr-xudrv/ulinux/unv_linux.c5
1 files changed, 5 insertions, 0 deletions
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;
}