On 08/09/2018 11:44 AM, Paolo Bonzini wrote:
On 09/08/2018 11:20, Emanuele wrote:
Why this? Shouldn't it be:
if (g_strcmp0(old_path, path)) {
qtest_end(); /* handles global_qtest = NULL */
g_free(old_path); /* handles NULL */
old_path = path;
global_qtest = qtest_start(path);
} else ....
Yes, of course. Though I'd have thought that my version has "just" a
memory leak. Even better, this could call qos_invalidate_command_line.
Can you post the fixes to a separate commit on github?
https://github.com/esposem/qemu/commit/4389e83522c06ce7001382284153d59105692061
I also added g_free(old_path); in qos-test main function, since last
old_path is not free'd.
This commit is part of qgraph-v3, where I am also applying Laurent's
suggestions.
Emanuele