From: Soren Hansen Date: Wed, 11 Aug 2010 21:51:41 +0000 (+0200) Subject: Close fd's of persistent tap devices X-Git-Tag: v0.8.4~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4358f76aa4dfa0aac9736f2c55683c1304f8b078;p=thirdparty%2Flibvirt.git 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 --- 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: