[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH / 4.0.1] fix fd leak in xenstore


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Tue, 14 Sep 2010 16:37:32 +0200
  • Delivery-date: Tue, 14 Sep 2010 07:40:19 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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 <olaf@xxxxxxxxx>

---
 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)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.