[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 37/37] tests: fix postcopy-test leaks
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH 37/37] tests: fix postcopy-test leaks |
Date: |
Tue, 19 Jul 2016 12:54:32 +0400 |
From: Marc-André Lureau <address@hidden>
A few strings are allocated and never freed.
Signed-off-by: Marc-André Lureau <address@hidden>
---
tests/postcopy-test.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c
index f6f6598..9b32c5e 100644
--- a/tests/postcopy-test.c
+++ b/tests/postcopy-test.c
@@ -132,6 +132,7 @@ static void wait_for_serial(const char *side)
char *serialpath = g_strdup_printf("%s/%s", tmpfs, side);
FILE *serialfile = fopen(serialpath, "r");
+ g_free(serialpath);
do {
int readvalue = fgetc(serialfile);
@@ -143,7 +144,6 @@ static void wait_for_serial(const char *side)
case 'B':
/* It's alive! */
fclose(serialfile);
- g_free(serialpath);
return;
case EOF:
@@ -288,6 +288,7 @@ static void cleanup(const char *filename)
char *path = g_strdup_printf("%s/%s", tmpfs, filename);
unlink(path);
+ g_free(path);
}
static void test_migrate(void)
@@ -319,6 +320,7 @@ static void test_migrate(void)
" -drive file=%s,format=raw"
" -incoming %s",
tmpfs, bootpath, uri);
+ g_free(bootpath);
to = qtest_init(cmd);
g_free(cmd);
--
2.9.0
- [Qemu-devel] [PATCH 31/37] tests: free a bunch of qmp responses, (continued)
- [Qemu-devel] [PATCH 31/37] tests: free a bunch of qmp responses, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 32/37] usb: free leaking path, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 33/37] bus: simplify name handling, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 34/37] tests: pc-cpu-test, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 36/37] ahci: fix sglist leak on retry, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 35/37] tests: fix rsp leak in postcopy-test, marcandre . lureau, 2016/07/19
- [Qemu-devel] [PATCH 37/37] tests: fix postcopy-test leaks,
marcandre . lureau <=