summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-12-07 11:04:32 +0200
committerAvi Kivity <avi@redhat.com>2009-12-07 11:04:32 +0200
commit149d76049af52aa76f4665b6bc9bdbd5904a8588 (patch)
treee07c6dfe28f03438dff9bb07240a7534c010f990 /kvm-all.c
parentMerge commit 'e9b2e81889d9877415710484b876ee57a42b0bcb' into upstream-merge (diff)
parentDon't leak file descriptors (diff)
downloadqemu-kvm-149d76049af52aa76f4665b6bc9bdbd5904a8588.tar.gz
qemu-kvm-149d76049af52aa76f4665b6bc9bdbd5904a8588.tar.bz2
qemu-kvm-149d76049af52aa76f4665b6bc9bdbd5904a8588.zip
Merge commit '40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4' into upstream-merge
* commit '40ff6d7e8dceca227e7f8a3e8e0d58b2c66d19b4': Don't leak file descriptors qemu-img: There is more than one host device driver qcow2: Fix some more qemu_malloc fallout qcow2: Store exact backing format length virtio-blk: Implement rerror option ide: Implement rerror option Conflicts: posix-aio-compat.c Extended qemu_set_cloexec() to compatfd.c. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 8de370a58..91db3bc16 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -420,7 +420,7 @@ int kvm_init(int smp_cpus)
s->slots[i].slot = i;
s->vmfd = -1;
- s->fd = open("/dev/kvm", O_RDWR);
+ s->fd = qemu_open("/dev/kvm", O_RDWR);
if (s->fd == -1) {
fprintf(stderr, "Could not access KVM kernel module: %m\n");
ret = -errno;