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>
stable-2.9
Marc-André Lureau 2016-11-10 12:25:00 +04:00
parent e7c83a885f
commit fc34059f08
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}