From a93504cca4c1b95421ba360ea22a98f978bf1b2a Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Wed, 11 Jun 2014 17:17:15 +0200 Subject: [PATCH] leaseshelper: fix crash Commit baafe668 introduced new leaseshelper with a crash of freeing env string. Calling 'getenv()' inside 'virGetEnvAllowSUID()' may return a static string and we definitely should not free it. The author probably want to free the copy of that string. Signed-off-by: Pavel Hrdina --- src/network/leaseshelper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c index b6f6c32b50..69081c3581 100644 --- a/src/network/leaseshelper.c +++ b/src/network/leaseshelper.c @@ -351,7 +351,7 @@ main(int argc, char **argv) virPidFileReleasePath(pid_file, pid_file_fd); VIR_FREE(pid_file); - VIR_FREE(exptime_tmp); + VIR_FREE(exptime); VIR_FREE(custom_lease_file); virJSONValueFree(lease_new); virJSONValueFree(leases_array); -- 2.39.5