From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: [PATCH 03/18] xenpaging: fix fd leak in xenstore Date: Fri, 15 Oct 2010 16:12:05 +0200 Message-ID: <20101015141203.401348063@aepfle.de> References: <20101015141202.309585877@aepfle.de> Return-path: Content-Disposition: inline; filename=xenpaging.xs_daemon_close.patch List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Missing from commit 'libxl: Backported stuff from unstable' Without this change, xs_daemon_open/xs_daemon_close will leak filedescriptors. Signed-off-by: Olaf Hering --- tools/xenstore/xs.c | 2 ++ 1 file changed, 2 insertions(+) --- xen-4.0.1-testing.orig/tools/xenstore/xs.c +++ xen-4.0.1-testing/tools/xenstore/xs.c @@ -285,6 +285,8 @@ void xs_daemon_close(struct xs_handle *h mutex_unlock(&h->request_mutex); mutex_unlock(&h->reply_mutex); mutex_unlock(&h->watch_mutex); + + close_fds_free(h); } static bool read_all(int fd, void *data, unsigned int len)