Re: [PATCH v2 RESEND] qemu: fix memory leak about virDomainEventTunableNew

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

 





在 2022/9/27 16:11, Jiri Denemark 写道:
On Mon, Sep 26, 2022 at 19:55:52 +0800, luzhipeng wrote:
From: lu zhipeng <luzhipeng@xxxxxxxx>

For prevent memory leak and easier to use, So change
virDomainEventTunableNew to get virTypedParameterPtr *params
and set it = NULL.

Signed-off-by: lu zhipeng <luzhipeng@xxxxxxxx>
---
  src/conf/domain_event.c    | 14 +++++++-------
  src/conf/domain_event.h    |  4 ++--
  src/qemu/qemu_driver.c     | 22 ++++++++++------------
  src/remote/remote_driver.c |  2 +-
  4 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index ff8ea2c389..ff39975104 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -1495,8 +1495,8 @@ static virObjectEvent *
  virDomainEventTunableNew(int id,
                           const char *name,
                           unsigned char *uuid,
-                         virTypedParameterPtr params,
-                         int nparams)
+                         virTypedParameterPtr *params,
+			 int nparams)

I replaced the tabs in the indentation here and pushed the result. Next
time, please make sure you run "meson test" in addition to "meson
compile".

Thanks.

Reviewed-by: Jiri Denemark <jdenemar@xxxxxxxxxx>


Thanks,i got it






[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