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

[PATCH] Close the dir descriptor after usage. (#589574)



---
 isys/devices.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/isys/devices.c b/isys/devices.c
index 98c8769..53130d1 100644
--- a/isys/devices.c
+++ b/isys/devices.c
@@ -135,6 +135,8 @@ struct device **getDevices(enum deviceType type) {
             ret[numdevices+1] = NULL;
             numdevices++;
         }
+
+        closedir(dir);
     }
 storagedone:
 
@@ -210,6 +212,8 @@ storagedone:
             ret[numdevices+1] = NULL;
             numdevices++;
         }
+
+        closedir(dir);
     }
 netdone:
     return ret;
-- 
1.6.6.1


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