[libvirt] [PATCH 1/3] Fix memory leak on OOM in virSecuritySELinuxMCSFind

Eric Blake eblake at redhat.com
Wed Mar 13 22:28:48 UTC 2013


On 03/13/2013 12:04 PM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> The body of the loop in virSecuritySELinuxMCSFind would
> directly 'return NULL' on OOM, instead of jumping to the
> cleanup label. This caused a leak of several local vars.
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  src/security/security_selinux.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

ACK, and a bit surprised Coverity hasn't called us on it.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130313/0e58553a/attachment-0001.sig>


More information about the libvir-list mailing list