* dolog leaked the log message (!)
* main() leaked the config_data (perhaps a false positive from valgrind,
but it's nicer to tidy it up).
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
config_file, strerror(errno));
parse_global_config(config_file, config_data, config_len);
free(config_file);
+ free(config_data);
/* Reset options for per-command use of getopt. */
argv += optind;
static void dolog(const char *file, int line, const char *func, char *fmt, ...)
{
va_list ap;
- char *s;
+ char *s = NULL;
int rc;
va_start(ap, fmt);
va_end(ap);
if (rc >= 0)
libxl_write_exactly(NULL, logfile, s, rc, NULL, NULL);
+ free(s);
}
static void printf_info(int domid,