Plug skipped-qemudCleanup leak.

* qemud/qemud.c (main): Call qemudCleanup also upon failure.
Otherwise, an error return would skip it and induce leaks.
This commit is contained in:
Jim Meyering 2008-03-03 13:16:31 +00:00
parent ba8459e859
commit cd6eefd3e8
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,9 @@
Mon Mar 3 14:14:03 CET 2008 Jim Meyering <meyering@redhat.com> Mon Mar 3 14:14:03 CET 2008 Jim Meyering <meyering@redhat.com>
Plug skipped-qemudCleanup leak.
* qemud/qemud.c (main): Call qemudCleanup also upon failure.
Otherwise, an error return would skip it and induce leaks.
Plug remoteReadConfigFile leak. Plug remoteReadConfigFile leak.
* qemud/qemud.c (remoteReadConfigFile): Be careful to free * qemud/qemud.c (remoteReadConfigFile): Be careful to free
"conf" after a successful virConfReadFile. "conf" after a successful virConfReadFile.

View File

@ -2166,8 +2166,6 @@ int main(int argc, char **argv) {
qemudRunLoop(server); qemudRunLoop(server);
qemudCleanup(server);
close(sigwrite); close(sigwrite);
if (godaemon) if (godaemon)
@ -2181,6 +2179,7 @@ int main(int argc, char **argv) {
unlink (pid_file); unlink (pid_file);
error1: error1:
qemudCleanup(server);
return ret; return ret;
} }