提交 6eed3fea 编写于 作者: J Jim Meyering

virExecWithHook: avoid leak on OOM error path

* src/util/util.c (virExecWithHook): Free argv_str string before
returning upon failure to allocate space for environment.
上级 fd10c4e1
......@@ -631,6 +631,7 @@ virExecWithHook(virConnectPtr conn,
if (envp) {
if ((envp_str = virArgvToString(envp)) == NULL) {
VIR_FREE(argv_str);
virReportOOMError(conn);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册