[PATCH] fix missing call to closedir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 29e477a29519c4a232ba02b6878beeeaa6d57da6 Mon Sep 17 00:00:00 2001
From: Vladimir Botka <vlado@xxxxxxxxxxxxx>
Date: Tue, 25 Aug 2009 13:23:29 +0200
Subject: [PATCH] fix missing call to closedir

---
 compat/dun.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/compat/dun.c b/compat/dun.c
index c74e5ee..7140bac 100644
--- a/compat/dun.c
+++ b/compat/dun.c
@@ -106,8 +106,10 @@ static int uses_rfcomm(char *path, char *dev)
 		int  len = readlink(de->d_name, link, sizeof(link));
 		if (len > 0) {
 			link[len] = 0;
-			if (strstr(link, dev))
+			if (strstr(link, dev)) {
+				closedir(dir);
 				return 1;
+			}
 		}
 	}
 
-- 
1.6.0.2


Cheers,
-- 
	-vlado
	Vladimir Botka

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux