tools: acrn-manager: fix fd leaking

close dir to avoid fd leaking.

Tracked-On: #1477
Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
This commit is contained in:
Yan, Like
2018-10-12 15:37:16 +08:00
committed by wenlingz
parent dc05ffffaa
commit f582757dd4
2 changed files with 5 additions and 1 deletions

View File

@@ -150,6 +150,7 @@ static void _scan_alive_vm(void)
vm->update = update_count;
}
closedir(dir);
}
static void _scan_added_vm(void)
@@ -218,6 +219,8 @@ static void _scan_added_vm(void)
vm->state = VM_CREATED;
vm->update = update_count;
}
closedir(dir);
}
static void _remove_dead_vm(void)