summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/i8254.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-18 21:37:07 +0100
committerIngo Molnar <mingo@elte.hu>2008-11-18 21:37:07 +0100
commit5177dc3f2b3220b2dcfcf35eb9e6ec53ee818231 (patch)
tree29dd80a7b33426d0890aa07b5864224557c62af7 /arch/x86/kvm/i8254.c
parenttracing: kernel/trace/trace.c: introduce missing kfree() (diff)
parentMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block (diff)
downloadlinux-5177dc3f2b3220b2dcfcf35eb9e6ec53ee818231.tar.xz
linux-5177dc3f2b3220b2dcfcf35eb9e6ec53ee818231.zip
Merge branch 'linus' into tracing/urgent
Diffstat (limited to 'arch/x86/kvm/i8254.c')
-rw-r--r--arch/x86/kvm/i8254.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 8772dc946823..59ebd37ad79e 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -548,8 +548,10 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm)
mutex_lock(&kvm->lock);
pit->irq_source_id = kvm_request_irq_source_id(kvm);
mutex_unlock(&kvm->lock);
- if (pit->irq_source_id < 0)
+ if (pit->irq_source_id < 0) {
+ kfree(pit);
return NULL;
+ }
mutex_init(&pit->pit_state.lock);
mutex_lock(&pit->pit_state.lock);