Michael S. Tsirkin wrote: > On Fri, Apr 24, 2009 at 12:30:17AM -0400, Gregory Haskins wrote: > >> +int kvm_irqfd(kvm_context_t kvm, int gsi) >> +{ >> + int fd, r; >> + >> + if (!kvm_check_extension(kvm, KVM_CAP_IRQFD)) >> + return -ENOENT; >> + >> + fd = eventfd(0, 0); >> + if (fd < 0) >> + return fd; >> + >> + r = assign_irqfd(kvm, fd, gsi); >> + if (r < 0) >> + return r; >> > > Do we need to close fd on error? > Good catch. This will be changing in v3 to do the allocation in kernel, but I will be sure to properly cleanup this type of leak, however that ends up looking. Thanks Michael. -Greg > >> + >> + return fd; >> +} >>
Attachment:
signature.asc
Description: OpenPGP digital signature