From: Gonglei <arei.gong...@huawei.com> Signed-off-by: Gonglei <arei.gong...@huawei.com> --- qemu-bridge-helper.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c index 6a0974e..dce5abc 100644 --- a/qemu-bridge-helper.c +++ b/qemu-bridge-helper.c @@ -436,7 +436,12 @@ int main(int argc, char **argv) /* profit! */ cleanup: - + if (fd >= 0) { + close(fd); + } + if (ctlfd >= 0) { + close(ctlfd); + } while ((acl_rule = QSIMPLEQ_FIRST(&acl_list)) != NULL) { QSIMPLEQ_REMOVE_HEAD(&acl_list, entry); g_free(acl_rule); -- 1.7.12.4