On Thu, Jun 26, 2025 at 03:53:35 -0000, liu.song13(a)zte.com.cn wrote:
> On Wed, Jun 25, 2025 at 09:27:33 +0800, liu.xuemei1(a)zte.com.cn
wrote:
>
> The above looks weird. Now 'client' is referenced twice and you delete
> an empty line?
Since the patch fixes the virStreamEventAddCallback (not freeing its 'opaque'),
'client' should be referenced before every call of it. I thought the second was
for virNetServerClientAddFilter and tried to make them more associative.
However it seems no matter the second reference exists or not, there is no leak
or UAF reported. I'll remove it in next version if I confirm this.
Having two references this way would look confusing, so if you decide
that it is necessary please add a comment explaining why it is
necessary.
In this patch it looked extra confusing as you deleted an empty line
right after the second reference which looked like you wanted to just
move the reference.