Re: [PATCH] qemu: domainjob: Allow free if cb is not set in qemuDomainObjClearJob

2022-03-07 Thread Michal Prívozník
On 3/2/22 13:33, Kristina Hanicova wrote: > We should allow resetting and freeing qemuDomainJobObj even if > 'cb' attribute is not set. This is theoretical for now, but the > attribute must not be always set in the future, so early return > would create memory leaks. It is sufficient to check if

[PATCH] qemu: domainjob: Allow free if cb is not set in qemuDomainObjClearJob

2022-03-02 Thread Kristina Hanicova
We should allow resetting and freeing qemuDomainJobObj even if 'cb' attribute is not set. This is theoretical for now, but the attribute must not be always set in the future, so early return would create memory leaks. It is sufficient to check if 'cb' exists before dereferencing it in