Re: [PATCH 1/4] Fix memory leaks in MDNS code

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

 



On 07/25/2011 01:03 PM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"<berrange@xxxxxxxxxx>

* src/rpc/virnetservermdns.c: Fix leaks
---
  src/rpc/virnetservermdns.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/rpc/virnetservermdns.c b/src/rpc/virnetservermdns.c
index ff2d92d..335274a 100644
--- a/src/rpc/virnetservermdns.c
+++ b/src/rpc/virnetservermdns.c
@@ -583,6 +583,7 @@ void virNetServerMDNSFree(virNetServerMDNSPtr mdns)
          group = tmp;
      }

+    VIR_FREE(mdns->poller);
      VIR_FREE(mdns);
  }


Could virNetServeMDNSFree() ever be called while mdns->client is still valid? (i.e. without calling virNetServerMDNSStop())


ACK, assuming the answer to that is No. (Otherwise maybe this function should call virNetServerMDNSStop().



@@ -601,6 +602,7 @@ void virNetServerMDNSGroupFree(virNetServerMDNSGroupPtr grp)
          entry = tmp;
      }

+    VIR_FREE(grp->name);
      VIR_FREE(grp);
  }

@@ -610,5 +612,6 @@ void virNetServerMDNSEntryFree(virNetServerMDNSEntryPtr entry)
      if (!entry)
          return;

+    VIR_FREE(entry->type);
      VIR_FREE(entry);
  }

--
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]