Re: [PATCH] admin: fix memory leak of typed parameters getting client info

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

 





On 9/30/19 12:57 PM, Daniel P. Berrangé wrote:
In the error code path, the temporary parameters are not freed.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---

Reviewed-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>

  src/admin/admin_server.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/src/admin/admin_server.c b/src/admin/admin_server.c
index 248df3f795..0d6091937d 100644
--- a/src/admin/admin_server.c
+++ b/src/admin/admin_server.c
@@ -310,6 +310,8 @@ adminClientGetInfo(virNetServerClientPtr client,
      ret = 0;
cleanup:
+    if (tmpparams)
+        virTypedParamsFree(tmpparams, *nparams);
      virObjectUnref(identity);
      VIR_FREE(sock_addr);
      return ret;

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