qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] test-qga: fix a resource leak in test_qga_guest_get_osinfo()
@ 2020-11-25 10:24 Alex Chen
  2020-11-25 10:40 ` Marc-André Lureau
  2020-11-26 10:37 ` Li Qiang
  0 siblings, 2 replies; 3+ messages in thread
From: Alex Chen @ 2020-11-25 10:24 UTC (permalink / raw)
  To: mdroth; +Cc: alex.chen, qemu-trivial, qemu-devel, zhang.zhanghailiang

The fixture->fd is created in fixture_setup() and, likewise, needs to be closed
in fixture_tear_down().

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Alex Chen <alex.chen@huawei.com>
---
 tests/test-qga.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/test-qga.c b/tests/test-qga.c
index c1b173b3cb..eb33264e8e 100644
--- a/tests/test-qga.c
+++ b/tests/test-qga.c
@@ -111,6 +111,7 @@ fixture_tear_down(TestFixture *fixture, gconstpointer data)
 
     g_rmdir(fixture->test_dir);
     g_free(fixture->test_dir);
+    close(fixture->fd);
 }
 
 static void qmp_assertion_message_error(const char     *domain,
-- 
2.19.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] test-qga: fix a resource leak in test_qga_guest_get_osinfo()
  2020-11-25 10:24 [PATCH] test-qga: fix a resource leak in test_qga_guest_get_osinfo() Alex Chen
@ 2020-11-25 10:40 ` Marc-André Lureau
  2020-11-26 10:37 ` Li Qiang
  1 sibling, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2020-11-25 10:40 UTC (permalink / raw)
  To: Alex Chen; +Cc: qemu trival, zhanghailiang, Michael Roth, QEMU

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

On Wed, Nov 25, 2020 at 2:37 PM Alex Chen <alex.chen@huawei.com> wrote:

> The fixture->fd is created in fixture_setup() and, likewise, needs to be
> closed
> in fixture_tear_down().
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Alex Chen <alex.chen@huawei.com>
>


Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  tests/test-qga.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/test-qga.c b/tests/test-qga.c
> index c1b173b3cb..eb33264e8e 100644
> --- a/tests/test-qga.c
> +++ b/tests/test-qga.c
> @@ -111,6 +111,7 @@ fixture_tear_down(TestFixture *fixture, gconstpointer
> data)
>
>      g_rmdir(fixture->test_dir);
>      g_free(fixture->test_dir);
> +    close(fixture->fd);
>  }
>
>  static void qmp_assertion_message_error(const char     *domain,
> --
> 2.19.1
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 1717 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] test-qga: fix a resource leak in test_qga_guest_get_osinfo()
  2020-11-25 10:24 [PATCH] test-qga: fix a resource leak in test_qga_guest_get_osinfo() Alex Chen
  2020-11-25 10:40 ` Marc-André Lureau
@ 2020-11-26 10:37 ` Li Qiang
  1 sibling, 0 replies; 3+ messages in thread
From: Li Qiang @ 2020-11-26 10:37 UTC (permalink / raw)
  To: Alex Chen; +Cc: qemu-trivial, zhanghailiang, Michael Roth, Qemu Developers

Alex Chen <alex.chen@huawei.com> 于2020年11月25日周三 下午6:37写道:
>
> The fixture->fd is created in fixture_setup() and, likewise, needs to be closed
> in fixture_tear_down().
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Alex Chen <alex.chen@huawei.com>

Reviewed-by: Li Qiang <liq3ea@gmail.com>

> ---
>  tests/test-qga.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/test-qga.c b/tests/test-qga.c
> index c1b173b3cb..eb33264e8e 100644
> --- a/tests/test-qga.c
> +++ b/tests/test-qga.c
> @@ -111,6 +111,7 @@ fixture_tear_down(TestFixture *fixture, gconstpointer data)
>
>      g_rmdir(fixture->test_dir);
>      g_free(fixture->test_dir);
> +    close(fixture->fd);
>  }
>
>  static void qmp_assertion_message_error(const char     *domain,
> --
> 2.19.1
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-26 10:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-25 10:24 [PATCH] test-qga: fix a resource leak in test_qga_guest_get_osinfo() Alex Chen
2020-11-25 10:40 ` Marc-André Lureau
2020-11-26 10:37 ` Li Qiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).