summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-07-03 12:48:12 -0700
committerEric Anholt <anholt@FreeBSD.org>2006-07-03 12:48:12 -0700
commit002e28c12c74aa63777f65cbfb382c2bfd0d6850 (patch)
tree0596ac8d62b1c939bb65c9354013cc669c31eeb9
parentcf46242e337481cd3b9b39d77dd621d2a63b11f9 (diff)
Correct AGP memory deallocation argument on *BSD.
This fixes leaks and eventual crashes with RandR resizing on Intel.
-rw-r--r--hw/xfree86/os-support/linux/lnx_agp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c
index 65a5a0ea3..77773f7fb 100644
--- a/hw/xfree86/os-support/linux/lnx_agp.c
+++ b/hw/xfree86/os-support/linux/lnx_agp.c
@@ -1,7 +1,7 @@
/*
* Abstraction of the AGP GART interface.
*
- * This version is for both Linux and FreeBSD.
+ * This version is for Linux and Free/Open/NetBSD.
*
* Copyright © 2000 VA Linux Systems, Inc.
* Copyright © 2001 The XFree86 Project, Inc.
@@ -264,7 +264,11 @@ xf86DeallocateGARTMemory(int screenNum, int key)
return FALSE;
}
+#ifdef __linux__
if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *)key) != 0) {
+#else
+ if (ioctl(gartFd, AGPIOC_DEALLOCATE, &key) != 0) {
+#endif
xf86DrvMsg(screenNum, X_WARNING,"xf86DeAllocateGARTMemory: "
"deallocation gart memory with key %d failed\n\t(%s)\n",
key, strerror(errno));