The dir variable needs to be closed before leaving.
Signed-off-by: Steve Grubb <[email protected]>
---
mesh/rpl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mesh/rpl.c b/mesh/rpl.c
index ac0f6b6f2..c53c6fbfd 100644
--- a/mesh/rpl.c
+++ b/mesh/rpl.c
@@ -143,8 +143,10 @@ static void get_entries(const char *iv_path, struct l_queue *rpl_list)
return;
iv_txt = basename(iv_path);
- if (sscanf(iv_txt, "%08x", &iv_index) != 1)
+ if (sscanf(iv_txt, "%08x", &iv_index) != 1) {
+ closedir(dir);
return;
+ }
memset(seq_txt, 0, sizeof(seq_txt));
--
2.31.1