Commit 63e46e4f authored by Eamon Walsh's avatar Eamon Walsh Committed by Eamon Walsh

devPrivates rework: properly free devPrivates on compatibility structures,

excluding pixmap.
parent 1cb84768
......@@ -63,6 +63,7 @@ SOFTWARE.
#include "scrnintstr.h"
#include "resource.h"
#include "windowstr.h"
#include "privates.h"
extern XID clientErrorValue;
extern int colormapPrivateCount;
......@@ -474,6 +475,7 @@ FreeColormap (pointer value, XID mid)
}
}
dixFreePrivates(*DEVPRIV_PTR(pmap));
if (pmap->devPrivates)
xfree(pmap->devPrivates);
......
......@@ -69,6 +69,7 @@ SOFTWARE.
#ifdef XKB
#include <xkbsrv.h>
#endif
#include "privates.h"
#include "xace.h"
#include "dispatch.h"
......@@ -502,6 +503,7 @@ CloseDevice(DeviceIntPtr dev)
XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource);
#endif
dixFreePrivates(*DEVPRIV_PTR(dev));
if (dev->devPrivates)
xfree(dev->devPrivates);
......
......@@ -134,6 +134,7 @@ int ProcInitialConnection();
#include "panoramiX.h"
#include "panoramiXsrv.h"
#endif
#include "privates.h"
#include "xace.h"
#ifdef XAPPGROUP
#include "appgroup.h"
......@@ -3651,6 +3652,7 @@ CloseDownClient(ClientPtr client)
#ifdef SMART_SCHEDULE
SmartLastClient = NullClient;
#endif
dixFreePrivates(*DEVPRIV_PTR(client));
xfree(client);
while (!clients[currentMaxClients-1])
......
......@@ -59,6 +59,7 @@ SOFTWARE.
#include "gcstruct.h"
#include "scrnintstr.h"
#include "dispatch.h"
#include "privates.h"
#include "xace.h"
#define EXTENSION_BASE 128
......@@ -290,6 +291,7 @@ CloseDownExtensions()
for (j = extensions[i]->num_aliases; --j >= 0;)
xfree(extensions[i]->aliases[j]);
xfree(extensions[i]->aliases);
dixFreePrivates(*DEVPRIV_PTR(extensions[i]));
xfree(extensions[i]);
}
xfree(extensions);
......
......@@ -61,6 +61,7 @@ SOFTWARE.
#include "scrnintstr.h"
#include "region.h"
#include "privates.h"
#include "dix.h"
#include <assert.h>
......@@ -903,6 +904,7 @@ FreeGC(pointer value, XID gid)
(*pGC->funcs->DestroyGC) (pGC);
if (pGC->dash != DefaultDash)
xfree(pGC->dash);
dixFreePrivates(*DEVPRIV_PTR(pGC));
xfree(pGC);
return(Success);
}
......
......@@ -103,6 +103,7 @@ Equipment Corporation.
#include "site.h"
#include "dixfont.h"
#include "extnsionst.h"
#include "privates.h"
#ifdef XPRINT
#include "DiPrint.h"
#endif
......@@ -496,6 +497,7 @@ main(int argc, char *argv[], char *envp[])
FreeAuditTimer();
dixFreePrivates(*DEVPRIV_PTR(serverClient));
xfree(serverClient->devPrivates);
serverClient->devPrivates = NULL;
......@@ -801,6 +803,7 @@ FreeScreen(ScreenPtr pScreen)
xfree(pScreen->WindowPrivateSizes);
xfree(pScreen->GCPrivateSizes);
xfree(pScreen->PixmapPrivateSizes);
dixFreePrivates(*DEVPRIV_PTR(pScreen));
xfree(pScreen->devPrivates);
xfree(pScreen);
}
......@@ -126,6 +126,7 @@ Equipment Corporation.
#ifdef XAPPGROUP
#include "appgroup.h"
#endif
#include "privates.h"
#include "xace.h"
/******
......@@ -975,6 +976,7 @@ DeleteWindow(pointer value, XID wid)
if (pWin->prevSib)
pWin->prevSib->nextSib = pWin->nextSib;
}
dixFreePrivates(*DEVPRIV_PTR(pWin));
xfree(pWin);
return Success;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment