79c4324644
Change-Id: I2d302dda68298877c65c99147f5bf22186a59aac
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From b76d4a1a4d7d0635044cd8542564803318ac5412 Mon Sep 17 00:00:00 2001
|
|
From: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
|
Date: Tue, 26 Sep 2023 07:49:12 +0000
|
|
Subject: [PATCH] qtest/npcm7xx_pwm-test: Fix memory leak in mft_qom_set
|
|
mainline inclusion commit d412597ec5a8406b2af6aa5fb7740e77c1bd3f8c category:
|
|
bugfix
|
|
|
|
---------------------------------------------------------------
|
|
|
|
g_strdup_printf() allocated memory for path, we should free it with
|
|
g_free() when no longer needed.
|
|
|
|
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
|
|
Reviewed-by: Hao Wu <wuhaotsh@google.com>
|
|
Message-Id: <20220531080921.4704-1-linmq006@gmail.com>
|
|
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
|
|
|
Signed-off-by: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
|
---
|
|
tests/qtest/npcm7xx_pwm-test.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/tests/qtest/npcm7xx_pwm-test.c b/tests/qtest/npcm7xx_pwm-test.c
|
|
index a54fd70d27..ddfc120df0 100644
|
|
--- a/tests/qtest/npcm7xx_pwm-test.c
|
|
+++ b/tests/qtest/npcm7xx_pwm-test.c
|
|
@@ -268,6 +268,9 @@ static void mft_qom_set(QTestState *qts, int index, const char *name,
|
|
path, name, value);
|
|
/* The qom set message returns successfully. */
|
|
g_assert_true(qdict_haskey(response, "return"));
|
|
+
|
|
+ qobject_unref(response);
|
|
+ g_free(path);
|
|
}
|
|
|
|
static uint32_t get_pll(uint32_t con)
|
|
--
|
|
2.41.0.windows.1
|
|
|