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

Re: [libvirt] [PATCH] rpc: Fix memory leak in remoteDomainSet*Parameters functions

On 07/27/2011 01:18 PM, Matthias Bolte wrote:
Add a new helper remoteFreeTypedParameters and teach the generator
to add it to the cleanup section.

  src/remote/remote_driver.c |   22 +++++++++++++++++-----
  src/rpc/gendispatch.pl     |    5 +++++
  2 files changed, 22 insertions(+), 5 deletions(-)


diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 0652e0d..e5bfa4b 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -1208,6 +1208,22 @@ done:
      return rv;

+/* Helper to free typed parameters. */
+static void
+remoteFreeTypedParameters(remote_typed_param *args_params_val,
+                          u_int args_params_len)

Not the typical one-arg free function, so it can't be listed in cfg.mk, but that's okay, since it's only used in one file.

Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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