Re: [libvirt] [PATCH 1/2] security: DAC: fix the transaction model's list append

2017-01-17 Thread Erik Skultety
> > -if (VIR_APPEND_ELEMENT(list->items, list->nItems, item) < 0) { > > -VIR_FREE(item); > > -return -1; > > -} > > +if (VIR_APPEND_ELEMENT(list->items, list->nItems, item) < 0) > > +goto cleanup; > > > > -return 0; > > +tmp = NULL; > > +item =

Re: [libvirt] [PATCH 1/2] security: DAC: fix the transaction model's list append

2017-01-17 Thread Michal Privoznik
On 01/17/2017 02:56 PM, Erik Skultety wrote: > The problem is in the way how the list item is created prior to > appending it to the transaction list - the @path attribute is just a > shallow copy instead of deep copy of the hostdev device's path. > Unfortunately, the hostdev devices from which

[libvirt] [PATCH 1/2] security: DAC: fix the transaction model's list append

2017-01-17 Thread Erik Skultety
The problem is in the way how the list item is created prior to appending it to the transaction list - the @path attribute is just a shallow copy instead of deep copy of the hostdev device's path. Unfortunately, the hostdev devices from which the @path is extracted, in order to add them into the