From 4358f76aa4dfa0aac9736f2c55683c1304f8b078 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Wed, 11 Aug 2010 23:51:41 +0200 Subject: [PATCH] Close fd's of persistent tap devices When passing a NULL tapfd argument to brAddTap, we need to close the fd of the tap device. If we don't, libvirt will keep the fd open indefinitely and renders the the guest unable to configure its side of the tap device. Signed-off-by: Soren Hansen --- src/util/bridge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/bridge.c b/src/util/bridge.c index 7d0caaef7d..da62c5ec6d 100644 --- a/src/util/bridge.c +++ b/src/util/bridge.c @@ -538,6 +538,8 @@ brAddTap(brControl *ctl, goto error; if (tapfd) *tapfd = fd; + else + close(fd); return 0; error: -- GitLab