On Tue, Jul 03, 2018 at 17:05:31 +0200, Marc Hartmayer wrote: > On Tue, Jul 03, 2018 at 04:22 PM +0200, Peter Krempa <pkre...@redhat.com> > wrote: > > On Tue, Jul 03, 2018 at 09:34:56 -0400, John Ferlan wrote: > >> Feels like we've done this before... > >> > >> 97202988 <sigh> and 6050affb7f > > > > Specifically the former commit was not good enough to cover this case > > despite touching this code. > > Would it make sense to always allocate the > qemuDomainStorageSourcePrivate struct? We’d be wasting some memory, but > at the same time the code would be easier to read and less prone to > error. e.g. qemuDomainDeviceDiskDefPostParseRestoreSecAlias would be > simpler. > > For the privateData of virConnect, virDomainVsockDef, virDisk, > virDomainVcpu… it’s implemented this way. > > Anyway: Reviewed-by: Marc Hartmayer <mhart...@linux.ibm.com> and thanks > for fixing it!
virStorageSource is not allocated using a helper so this would require refactoring all allocations and passing in of the private data structure which contains the callback to allocate the private data. I was thinking about it but did not find fixing it compelling enough to do it myself.
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list