summaryrefslogtreecommitdiff
path: root/recipes/xorg-xserver/xserver-xorg-1.8.99.904/0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/xorg-xserver/xserver-xorg-1.8.99.904/0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch')
-rw-r--r--recipes/xorg-xserver/xserver-xorg-1.8.99.904/0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/recipes/xorg-xserver/xserver-xorg-1.8.99.904/0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch b/recipes/xorg-xserver/xserver-xorg-1.8.99.904/0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch
new file mode 100644
index 0000000000..adbc274fd7
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-xorg-1.8.99.904/0001-xf86Modes-make-sure-that-DisplayModeRec-name-is-init.patch
@@ -0,0 +1,25 @@
+From 7deb3068ff65ecadf035e8e493d418aca89c9212 Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa@gmail.com>
+Date: Wed, 30 Jun 2010 10:42:36 +0200
+Subject: [PATCH] xf86Modes: make sure that DisplayModeRec name is initialized to NULL and then don't call free() on it in xf86SetModeDefaultName
+
+---
+ hw/xfree86/modes/xf86Modes.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
+index 05f4319..09a9679 100644
+--- a/hw/xfree86/modes/xf86Modes.c
++++ b/hw/xfree86/modes/xf86Modes.c
+@@ -206,7 +206,7 @@ xf86DuplicateMode(const DisplayModeRec *pMode)
+ {
+ DisplayModePtr pNew;
+
+- pNew = xnfalloc(sizeof(DisplayModeRec));
++ pNew = xnfcalloc(1, sizeof(DisplayModeRec));
+ *pNew = *pMode;
+ pNew->next = NULL;
+ pNew->prev = NULL;
+--
+1.7.1
+