X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=qemu-bridge-helper.c;h=5396fbfbb6ca5d4415bd3165dc68bb4f5004a7a0;hb=6d54af0ea9eeee70b4c0eb48bd2ae1d22b207dd4;hp=6a0974eb4881a6d441e44713bd8c7072a845be7c;hpb=226ecabfbd410c7b2041385ea4b6f083a09ce8a2;p=mirror_qemu.git diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c index 6a0974eb48..5396fbfbb6 100644 --- a/qemu-bridge-helper.c +++ b/qemu-bridge-helper.c @@ -13,19 +13,9 @@ * */ -#include "config-host.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include "qemu/osdep.h" + + #include #include #include @@ -229,7 +219,7 @@ int main(int argc, char **argv) unsigned long ifargs[4]; #endif int ifindex; - int fd, ctlfd, unixfd = -1; + int fd = -1, ctlfd = -1, unixfd = -1; int use_vnet = 0; int mtu; const char *bridge = NULL; @@ -436,7 +426,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);