From 34652da1b4c6ae58e9cb15740ec33ea0fd54efef Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 15 Sep 2010 08:19:58 +0100 Subject: [PATCH] Fix fd leak in xenstore Missing from commit 'libxl: Backported stuff from unstable' Without this change, xs_daemon_open/xs_daemon_close will leak file descriptors. Signed-off-by: Olaf Hering --- tools/xenstore/xs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c index 2edabee4d0..8dc40eaf72 100644 --- a/tools/xenstore/xs.c +++ b/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)