kvm: irqchip: fix memory leak
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Wed, 2 Sep 2015 07:03:53 +0000 (12:33 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Nov 2015 22:37:39 +0000 (14:37 -0800)
commit1ce8b6bd3f9f77c49908e9391ebc72114a65fc97
tree7d730acc2306d51d334f664f1bc1594afbf83ad5
parentd61504b9fd2de498b0412abac8560c451a858f08
kvm: irqchip: fix memory leak

commit ba60c41ae392b473a1897faa0b8739fcb8759d69 upstream.

We were taking the exit path after checking ue->flags and return value
of setup_routing_entry(), but 'e' was not freed incase of a failure.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: William Dauchy <william@gandi.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
virt/kvm/irqchip.c