mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
libqtest: Correct small memory leak.
Fixes a small memory leak inside of libqtest. After we produce a test path and glib copies the string for itself, we should clean up our temporary copy. Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
f3cdcbaee1
commit
a7afc6b8c1
1 changed files with 1 additions and 0 deletions
|
@ -644,6 +644,7 @@ void qtest_add_func(const char *str, void (*fn))
|
|||
{
|
||||
gchar *path = g_strdup_printf("/%s/%s", qtest_get_arch(), str);
|
||||
g_test_add_func(path, fn);
|
||||
g_free(path);
|
||||
}
|
||||
|
||||
void qtest_memwrite(QTestState *s, uint64_t addr, const void *data, size_t size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue