From: Ian Campbell Date: Wed, 10 Feb 2016 16:26:24 +0000 (+0000) Subject: xenmon: close qos_fd when finished with it in alloc_qos_data X-Git-Tag: colo-prep-v8-base~114 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6d53f40fe19bacaac0cf0786e2fb6df4941426f7;p=people%2Fliuw%2Fxen.git xenmon: close qos_fd when finished with it in alloc_qos_data 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 Acked-by: Wei Liu --- diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c index eacacb071c..782f0c1fd1 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; }