From d28f8f4cc36b42ace02b8c02b80a945315fdbf24 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 23 Aug 2011 18:43:24 +0100 Subject: [PATCH] qemu detection: Free up previous qemu help/version strings if they exist. (cherry picked from commit 2ace9be4cd69e84cd88e5b0fd74de861a4973c91) --- src/launch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/launch.c b/src/launch.c index 769dc85..ca48bdd 100644 --- a/src/launch.c +++ b/src/launch.c @@ -1044,6 +1044,11 @@ test_qemu (guestfs_h *g) char cmd[1024]; FILE *fp; + free (g->qemu_help); + g->qemu_help = NULL; + free (g->qemu_version); + g->qemu_version = NULL; + snprintf (cmd, sizeof cmd, "LC_ALL=C '%s' -nographic -help", g->qemu); /* qemu -help should always work (qemu -version OTOH wasn't -- 1.8.3.1