diff options
author | John Snow <jsnow@redhat.com> | 2014-08-04 17:11:22 -0400 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-08-15 18:03:13 +0100 |
commit | a7afc6b8c13c70e9c40b4f666be80600f8ad0b3d (patch) | |
tree | dabfc4cafb8de9cad4f6b234ce0faf2a6facd99e /tests | |
parent | f3cdcbaee16d32b52d5015a8b1e8ddf5a27f7089 (diff) | |
download | qemu-a7afc6b8c13c70e9c40b4f666be80600f8ad0b3d.zip qemu-a7afc6b8c13c70e9c40b4f666be80600f8ad0b3d.tar.gz qemu-a7afc6b8c13c70e9c40b4f666be80600f8ad0b3d.tar.bz2 |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libqtest.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c index e525e6f..0bf17aa 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -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) |