Il 10/06/2014 16:10, Luiz Capitulino ha scritto:
> + qemu_mutex_lock(&hmp.out_lock); > if (qstring_get_length(hmp.outbuf) > 0) { > output = g_strdup(qstring_get_str(hmp.outbuf)); > } else { > output = g_strdup(""); > } > + qemu_mutex_unlock(&hmp.out_lock);Are you sure we need to lock/unlock in this function? hmp is allocated in the stack.
No, we don't but it was more obvious to me this way (and looking at it again, I'm pretty sure that some static analyzer would complain without these).
Paolo