Peter Krempa wrote:
> > +        if (!def->os.loader) {
> > +            def->os.loader = virDomainLoaderDefNew();
> 
> Can this ever be already allocated? [2]
>
> [2] I'm asking because this then could overwrite existing value here
> leaking the original.

I checked virVMXParseConfig(), it creates a fresh virDomainDef at line 1460
so the nil check can be removed and simplified to:

    def->os.loader = virDomainLoaderDefNew();

I have fixed other changes as you suggested, do let me know if above looks good.
Will send v2 shortly with all fixes applied.

Thanks for the review!

Reply via email to