Fix missing call to closedir

This commit is contained in:
Vladimir Botka 2009-08-25 13:23:29 +02:00 committed by Marcel Holtmann
parent e510d5231b
commit 8c4bcd2a8d

View File

@ -106,10 +106,12 @@ static int uses_rfcomm(char *path, char *dev)
int len = readlink(de->d_name, link, sizeof(link)); int len = readlink(de->d_name, link, sizeof(link));
if (len > 0) { if (len > 0) {
link[len] = 0; link[len] = 0;
if (strstr(link, dev)) if (strstr(link, dev)) {
closedir(dir);
return 1; return 1;
} }
} }
}
closedir(dir); closedir(dir);