Otherwise the fd is leaked. NB the mmap'd memory in the global
cpu_qos_data[n] is not affected by closing the underlying fd.

Compile tested only.

CID: 1055930

Signed-off-by: Ian Campbell <ian.campb...@citrix.com>
---
 tools/xenmon/xenbaked.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c
index eacacb0..782f0c1 100644
--- a/tools/xenmon/xenbaked.c
+++ b/tools/xenmon/xenbaked.c
@@ -689,6 +689,7 @@ static void alloc_qos_data(int ncpu)
         cpu_qos_data[n] = new_qos;
     }
     free(dummy);
+    close(qos_fd);
     new_qos = NULL;
 }
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to