mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user