提交 a93504cc 编写于 作者: P Pavel Hrdina

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: NPavel Hrdina <phrdina@redhat.com>
上级 de43582b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册