Signed-off-by: Niels Thykier <[email protected]>
---
 hw/xfree86/common/xf86sbusBus.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/xfree86/common/xf86sbusBus.c b/hw/xfree86/common/xf86sbusBus.c
index b6a6b94..0e9ece0 100644
--- a/hw/xfree86/common/xf86sbusBus.c
+++ b/hw/xfree86/common/xf86sbusBus.c
@@ -641,11 +641,12 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, 
int *indices,
     int i, index;
     sbusCmapPtr cmap;
     struct fbcmap fbcmap;
-    unsigned char *data = malloc(numColors * 3);
+    unsigned char *data;
 
     cmap = SBUSCMAPPTR(pScrn->pScreen);
     if (!cmap)
         return;
+    data  = malloc(numColors * 3);
     fbcmap.count = 0;
     fbcmap.index = indices[0];
     fbcmap.red = data;
-- 
1.7.10.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to