mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 09:31:50 +00:00
KVM: destroy workqueue on kvm_create_pit() failures
kernel needs to destroy workqueue if kvm_create_pit() fails, otherwise after pit is freed, the workqueue is leaked. Signed-off-by: Xiaotian Feng <dfeng@redhat.com> Cc: Avi Kivity <avi@redhat.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Gleb Natapov <gleb@redhat.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Gregory Haskins <ghaskins@novell.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
f45755b834
commit
3185bf8c23
@ -742,7 +742,7 @@ fail:
|
||||
kvm_unregister_irq_mask_notifier(kvm, 0, &pit->mask_notifier);
|
||||
kvm_unregister_irq_ack_notifier(kvm, &pit_state->irq_ack_notifier);
|
||||
kvm_free_irq_source_id(kvm, pit->irq_source_id);
|
||||
|
||||
destroy_workqueue(pit->wq);
|
||||
kfree(pit);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user