summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-04-05 14:18:05 -0400
committerEamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil>2007-04-05 14:18:05 -0400
commit5ad562565ac8ef9257da3afb0de1ae4f90f80fe9 (patch)
treedb1cc6bbc7f1219c74fb1443769c49cb171d53a8
parent1d550bb2c5cb5b3e588f0e0b68a421dc1cb8bd7c (diff)
devPrivates rework: properly free devPrivates on compatibility structures,
type pixmap. Requires ddx'es to call the free function from DestroyPixmap.
-rw-r--r--afb/afb.h1
-rw-r--r--afb/afbpixmap.c1
-rw-r--r--cfb/cfb.h1
-rw-r--r--cfb/cfbpixmap.c1
-rw-r--r--fb/fb.h1
-rw-r--r--fb/fbpixmap.c1
-rw-r--r--hw/dmx/dmxpixmap.c2
-rw-r--r--hw/xgl/xglpixmap.c1
-rw-r--r--hw/xnest/Pixmap.c2
-rw-r--r--hw/xprint/ps/PsPixmap.c8
-rw-r--r--mfb/mfb.h1
-rw-r--r--mfb/mfbpixmap.c1
12 files changed, 20 insertions, 1 deletions
diff --git a/afb/afb.h b/afb/afb.h
index 5aa2b0c92..b3ed1ee3f 100644
--- a/afb/afb.h
+++ b/afb/afb.h
@@ -55,6 +55,7 @@ SOFTWARE.
#include "gc.h"
#include "colormap.h"
#include "regionstr.h"
+#include "privates.h"
#include "mibstore.h"
#include "mfb.h"
diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c
index 77ba53513..5a81679e8 100644
--- a/afb/afbpixmap.c
+++ b/afb/afbpixmap.c
@@ -113,6 +113,7 @@ afbDestroyPixmap(pPixmap)
{
if(--pPixmap->refcnt)
return(TRUE);
+ dixFreePrivates(*DEVPRIV_PTR(pPixmap));
xfree(pPixmap);
return(TRUE);
}
diff --git a/cfb/cfb.h b/cfb/cfb.h
index 8c682ae8d..15332ff97 100644
--- a/cfb/cfb.h
+++ b/cfb/cfb.h
@@ -37,6 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "colormap.h"
#include "miscstruct.h"
#include "servermd.h"
+#include "privates.h"
#include "windowstr.h"
#include "mfb.h"
#undef PixelType
diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c
index 6fdf3eae6..ed01316ed 100644
--- a/cfb/cfbpixmap.c
+++ b/cfb/cfbpixmap.c
@@ -107,6 +107,7 @@ cfbDestroyPixmap(pPixmap)
{
if(--pPixmap->refcnt)
return TRUE;
+ dixFreePrivates(*DEVPRIV_PTR(pPixmap));
xfree(pPixmap);
return TRUE;
}
diff --git a/fb/fb.h b/fb/fb.h
index e60507874..9e88667c8 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -38,6 +38,7 @@
#include "mi.h"
#include "migc.h"
#include "mibstore.h"
+#include "privates.h"
#ifdef RENDER
#include "picturestr.h"
#else
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index 18c120440..8c3216a6c 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -98,6 +98,7 @@ fbDestroyPixmap (PixmapPtr pPixmap)
{
if(--pPixmap->refcnt)
return TRUE;
+ dixFreePrivates(*DEVPRIV_PTR(pPixmap));
xfree(pPixmap);
return TRUE;
}
diff --git a/hw/dmx/dmxpixmap.c b/hw/dmx/dmxpixmap.c
index 934060675..e617134f1 100644
--- a/hw/dmx/dmxpixmap.c
+++ b/hw/dmx/dmxpixmap.c
@@ -45,6 +45,7 @@
#include "pixmapstr.h"
#include "servermd.h"
+#include "privates.h"
/** Initialize a private area in \a pScreen for pixmap information. */
Bool dmxInitPixmap(ScreenPtr pScreen)
@@ -173,6 +174,7 @@ Bool dmxDestroyPixmap(PixmapPtr pPixmap)
dmxSync(dmxScreen, FALSE);
}
}
+ dixFreePrivates(*DEVPRIV_PTR(pPixmap));
xfree(pPixmap);
#if 0
diff --git a/hw/xgl/xglpixmap.c b/hw/xgl/xglpixmap.c
index 368c3eaeb..166c33eb9 100644
--- a/hw/xgl/xglpixmap.c
+++ b/hw/xgl/xglpixmap.c
@@ -310,6 +310,7 @@ xglDestroyPixmap (PixmapPtr pPixmap)
xglFiniPixmap (pPixmap);
+ dixFreePrivates(*DEVPRIV_PTR(pPixmap));
xfree (pPixmap);
return TRUE;
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index 612df8dac..c4b8aa65e 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -24,6 +24,7 @@ is" without express or implied warranty.
#include "regionstr.h"
#include "gc.h"
#include "servermd.h"
+#include "privates.h"
#include "mi.h"
#include "Xnest.h"
@@ -74,6 +75,7 @@ xnestDestroyPixmap(PixmapPtr pPixmap)
if(--pPixmap->refcnt)
return TRUE;
XFreePixmap(xnestDisplay, xnestPixmap(pPixmap));
+ dixFreePrivates(*DEVPRIV_PTR(pPixmap));
xfree(pPixmap);
return TRUE;
}
diff --git a/hw/xprint/ps/PsPixmap.c b/hw/xprint/ps/PsPixmap.c
index c3259c98c..220feab2b 100644
--- a/hw/xprint/ps/PsPixmap.c
+++ b/hw/xprint/ps/PsPixmap.c
@@ -79,6 +79,7 @@ in this Software without prior written authorization from The Open Group.
#include "windowstr.h"
#include "gcstruct.h"
+#include "privates.h"
#include "Ps.h"
@@ -111,9 +112,13 @@ PsCreatePixmap(
pPixmap->devKind = 0;
pPixmap->refcnt = 1;
+ pPixmap->devPrivates = (DevUnion *)xcalloc(1, sizeof(DevUnion));
+ if( !pPixmap->devPrivates )
+ { xfree(pPixmap); return NullPixmap; }
+
pPixmap->devPrivate.ptr = (PsPixmapPrivPtr)xcalloc(1, sizeof(PsPixmapPrivRec));
if( !pPixmap->devPrivate.ptr )
- { xfree(pPixmap); return NullPixmap; }
+ { xfree(pPixmap->devPrivates); xfree(pPixmap); return NullPixmap; }
return pPixmap;
}
@@ -196,6 +201,7 @@ PsDestroyPixmap(PixmapPtr pPixmap)
PsScrubPixmap(pPixmap);
xfree(priv);
+ dixFreePrivates(*DEVPRIV_PTR(pPixmap));
xfree(pPixmap);
return TRUE;
}
diff --git a/mfb/mfb.h b/mfb/mfb.h
index f597b16a5..3cded7b71 100644
--- a/mfb/mfb.h
+++ b/mfb/mfb.h
@@ -58,6 +58,7 @@ SOFTWARE.
#include "region.h"
#include "gc.h"
#include "colormap.h"
+#include "privates.h"
#include "miscstruct.h"
#include "mibstore.h"
diff --git a/mfb/mfbpixmap.c b/mfb/mfbpixmap.c
index e34972451..b13e3af0f 100644
--- a/mfb/mfbpixmap.c
+++ b/mfb/mfbpixmap.c
@@ -113,6 +113,7 @@ mfbDestroyPixmap(pPixmap)
{
if(--pPixmap->refcnt)
return TRUE;
+ dixFreePrivates(*DEVPRIV_PTR(pPixmap));
xfree(pPixmap);
return TRUE;
}