Plug remoteReadConfigFile leak.

* qemud/qemud.c (remoteReadConfigFile): Be careful to free
"conf" after a successful virConfReadFile.
This commit is contained in:
Jim Meyering 2008-03-03 13:15:57 +00:00
parent 1de5bace80
commit ba8459e859
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,9 @@
Mon Mar 3 14:14:03 CET 2008 Jim Meyering <meyering@redhat.com>
Plug remoteReadConfigFile leak.
* qemud/qemud.c (remoteReadConfigFile): Be careful to free
"conf" after a successful virConfReadFile.
Plug two leaks: host.migrateTrans and arch.name
* src/capabilities.c (virCapabilitiesFree): Free host.migrateTrans.
(virCapabilitiesFreeGuest): Free arch.name member.

View File

@ -1877,7 +1877,7 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
GET_CONF_STR (conf, filename, tcp_port);
if (remoteConfigGetAuth(conf, "auth_unix_rw", &auth_unix_rw, filename) < 0)
return -1;
goto free_and_fail;
#if HAVE_POLKIT
/* Change default perms to be wide-open if PolicyKit is enabled.
* Admin can always override in config file
@ -1886,11 +1886,11 @@ remoteReadConfigFile (struct qemud_server *server, const char *filename)
unix_sock_rw_mask = 0777;
#endif
if (remoteConfigGetAuth(conf, "auth_unix_ro", &auth_unix_ro, filename) < 0)
return -1;
goto free_and_fail;
if (remoteConfigGetAuth(conf, "auth_tcp", &auth_tcp, filename) < 0)
return -1;
goto free_and_fail;
if (remoteConfigGetAuth(conf, "auth_tls", &auth_tls, filename) < 0)
return -1;
goto free_and_fail;
GET_CONF_STR (conf, filename, unix_sock_group);
if (unix_sock_group) {