summaryrefslogtreecommitdiff
path: root/sysutils/aperture/patches
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2002-09-15 19:25:38 +0000
committertron <tron@pkgsrc.org>2002-09-15 19:25:38 +0000
commitcf29830eecfa763c8c4ff2e87e11f067cba839c0 (patch)
tree8b5867a2015579732d0cee4cb07625d6cec46ac3 /sysutils/aperture/patches
parent5de86789ec8a2a7d579886876a690b05096f9c40 (diff)
downloadpkgsrc-cf29830eecfa763c8c4ff2e87e11f067cba839c0.tar.gz
Fix a bug in this module which caused a kernel panic when the module was
loaded and unloaded without ever being used. The fix is based on an analysis provided by MAEKAWA Masahide in private e-mail. Bump package revision to reflect change.
Diffstat (limited to 'sysutils/aperture/patches')
-rw-r--r--sysutils/aperture/patches/patch-ab18
1 files changed, 15 insertions, 3 deletions
diff --git a/sysutils/aperture/patches/patch-ab b/sysutils/aperture/patches/patch-ab
index 5c05857b541..d4a0db734a5 100644
--- a/sysutils/aperture/patches/patch-ab
+++ b/sysutils/aperture/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.4 2002/09/14 08:14:22 tron Exp $
+$NetBSD: patch-ab,v 1.5 2002/09/15 19:25:38 tron Exp $
---- module/xf86_mod.c.orig Mon Sep 9 12:29:28 2002
-+++ module/xf86_mod.c Mon Sep 9 12:30:05 2002
+--- module/xf86_mod.c.orig Sun Sep 15 21:18:40 2002
++++ module/xf86_mod.c Sun Sep 15 21:22:02 2002
@@ -31,7 +31,11 @@
0,
seltrue, xf86mmap, 0};
@@ -14,3 +14,15 @@ $NetBSD: patch-ab,v 1.4 2002/09/14 08:14:22 tron Exp $
char *xf86_major_version = "2";
char *xf86_minor_version = "0";
+@@ -76,7 +80,10 @@
+
+ case LKM_E_UNLOAD:
+ /* Free allocated memory */
+- free(mem_range_softc.mr_desc, M_MEMDESC);
++ if (mem_range_softc.mr_desc != NULL) {
++ free(mem_range_softc.mr_desc, M_MEMDESC);
++ mem_range_softc.mr_desc = NULL;
++ }
+ break;
+
+ case LKM_E_STAT: