]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
security_manager.c: Append seclabel iff generated
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 28 Mar 2013 15:13:01 +0000 (16:13 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 28 Mar 2013 15:13:01 +0000 (16:13 +0100)
commita1c68a1fcbc27fff19e11d0b2a801b416e94366d
tree5272558919df7e4d399f6ef5d37017e9d86564fa
parent0e9df6bd1015bec72c63f14c0efa085ea7c75895
security_manager.c: Append seclabel iff generated

With my previous patches, we unconditionally appended a seclabel,
even if it wasn't generated but found in array of defined seclabels.
This resulted in double free later when doing virDomainDefFree
and iterating over the array of defined seclabels.

Moreover, there was another possibility of double free, if the
seclabel was generated in the last iteration of the process of
walking trough security managers array.
src/security/security_manager.c