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

[libvirt] [PATCH] libvirtd: plug a nominal leak



Running make check through valgrind exposed this:

40 bytes in 1 blocks are definitely lost in loss record 9 of 68
   at 0x4A05174: calloc (vg_replace_malloc.c:397)
   by 0x4C422C1: virAllocN (memory.c:128)
   by 0x412CB1: qemudRunLoop (qemud.c:1846)
   by 0x41480B: main (qemud.c:2469)

Here's the fix:

>From a660df67d623184001a74f5fcf88a2f58217ec29 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Thu, 11 Dec 2008 19:58:08 +0100
Subject: [PATCH] libvirtd: plug a nominal leak

* qemud/qemud.c (qemudRunLoop): Free server->workers.
---
 qemud/qemud.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/qemud/qemud.c b/qemud/qemud.c
index f35d0fd..80b8778 100644
--- a/qemud/qemud.c
+++ b/qemud/qemud.c
@@ -1919,6 +1919,7 @@ static int qemudRunLoop(struct qemud_server *server) {
         pthread_mutex_lock(&server->lock);
     }

+    free(server->workers);
     pthread_mutex_unlock(&server->lock);
     return ret;
 }
--
1.6.0.4.1044.g77718


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