aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-11-10 12:25:00 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-03-01 00:09:28 +0400
commitfc34059f080680b560b3f656988fdd9a75cd0eab (patch)
treeca43458fe34f735bd2976feb030eb85c7562cf96
parente7c83a885f865128ae3cf1946f8cb538b63cbfba (diff)
qtest: fix a memory leak
Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
-rw-r--r--qtest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qtest.c b/qtest.c
index a6858272eb..5aa6636ca8 100644
--- a/qtest.c
+++ b/qtest.c
@@ -240,6 +240,7 @@ static void GCC_FMT_ATTR(2, 3) qtest_sendf(CharBackend *chr,
va_start(ap, fmt);
buffer = g_strdup_vprintf(fmt, ap);
qtest_send(chr, buffer);
+ g_free(buffer);
va_end(ap);
}