[PATCH v3 03/28] lock_daemon: Fix some memleaks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



28 bytes in 1 blocks are definitely lost in loss record 26 of 66
   at 0x4C2CF0F: malloc (vg_replace_malloc.c:299)
   by 0x7A02719: strdup (strdup.c:42)
   by 0x197DC1: virStrdup (virstring.c:961)
   by 0x12B478: virLockDaemonConfigFilePath (lock_daemon_config.c:44)
   by 0x12A759: main (lock_daemon.c:1270)

62 (32 direct, 30 indirect) bytes in 1 blocks are definitely lost in loss record 41 of 66
   at 0x4C2EF26: calloc (vg_replace_malloc.c:711)
   by 0x151B61: virAlloc (viralloc.c:144)
   by 0x12B56C: virLockDaemonConfigNew (lock_daemon_config.c:71)
   by 0x12A491: main (lock_daemon.c:1262)

13 bytes in 1 blocks are definitely lost in loss record 21 of 70
   at 0x4C2CF0F: malloc (vg_replace_malloc.c:299)
   by 0x7A02719: strdup (strdup.c:42)
   by 0x197E3F: virStrdup (virstring.c:961)
   by 0x12C86B: virLockSpaceProtocolDispatchRegister (lock_daemon_dispatch.c:291)
   by 0x12BB73: virLockSpaceProtocolDispatchRegisterHelper (lock_daemon_dispatch_stubs.h:152)
   by 0x1336AA: virNetServerProgramDispatchCall (virnetserverprogram.c:437)
   by 0x13320D: virNetServerProgramDispatch (virnetserverprogram.c:304)
   by 0x139E3E: virNetServerProcessMsg (virnetserver.c:144)
   by 0x13A1A2: virNetServerDispatchNewMessage (virnetserver.c:230)
   by 0x1350F5: virNetServerClientDispatchMessage (virnetserverclient.c:343)
   by 0x137680: virNetServerClientDispatchEvent (virnetserverclient.c:1498)
   by 0x147704: virNetSocketEventHandle (virnetsocket.c:2140)

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/locking/lock_daemon.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index 272d2e3ae9..1438345c6d 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -733,6 +733,7 @@ virLockDaemonClientFree(void *opaque)
     }
 
     virMutexDestroy(&priv->lock);
+    VIR_FREE(priv->ownerName);
     VIR_FREE(priv);
 }
 
@@ -1281,6 +1282,7 @@ int main(int argc, char **argv) {
                   virGetLastErrorMessage(), remote_config_file);
         exit(EXIT_FAILURE);
     }
+    VIR_FREE(remote_config_file);
 
     if (virLockDaemonSetupLogging(config, privileged, verbose, godaemon) < 0) {
         VIR_ERROR(_("Can't initialize logging"));
@@ -1494,6 +1496,7 @@ int main(int argc, char **argv) {
     VIR_FREE(admin_sock_file);
     VIR_FREE(state_file);
     VIR_FREE(run_dir);
+    virLockDaemonConfigFree(config);
     return ret;
 
  no_memory:
-- 
2.16.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux