提交 9d50b323 编写于 作者: M Matthias Bolte

Fix memory leak in __virExec

Commit e0d014f2 made binary potentially allocated on the heap.
It was freed in the parent in the error path, but not in the success path
that doesn't goto the cleanup label.

Found by 'make -C tests valgrind'.
上级 701bee01
......@@ -568,6 +568,10 @@ __virExec(const char *const*argv,
}
*retpid = pid;
if (binary != argv[0])
VIR_FREE(binary);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册