tools/libxl: Improvements to libxl-save-helper when using valgrind
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 11 Apr 2014 15:46:14 +0000 (16:46 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 16 Apr 2014 16:08:02 +0000 (17:08 +0100)
commit82774acf35575d40bd90606595e8170ae38ded50
tree0e894067efae4a6b7a8d343a6dfcfad3a2ac20ea
parentdd7317a4a24d764d31caf6bc87060b399bfd5648
tools/libxl: Improvements to libxl-save-helper when using valgrind

Fix two unfree()'d allocations in libxl-save-helper, to get them out of the
way of other legitimate complaints from valgrind.

The first is easy; close the interface to libxc when done with it.

The second can be fixed by removing the complexity of creating the logging
instance.  Initialise the global 'logger' in place rather than as an
allocation, which requires changing the indirection of its use in 5 locations.

struct xentoollog_logger_tellparent and function createlogger_tellparent() are
now unused and removed.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_save_helper.c