]> xenbits.xensource.com Git - xen.git/commitdiff
xenmon: close qos_fd when finished with it in alloc_qos_data
authorIan Campbell <ian.campbell@citrix.com>
Wed, 10 Feb 2016 16:26:24 +0000 (16:26 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 11 Feb 2016 15:12:06 +0000 (15:12 +0000)
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.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/xenmon/xenbaked.c

index eacacb071cffff7b30167325c6f8dc38adc71f66..782f0c1fd143ab94c4853185786537d9dd92392f 100644 (file)
@@ -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;
 }