Commit 8b74ff1c authored by Ulrich Sibiller's avatar Ulrich Sibiller

Pixmap.c: use SAFE_free

parent 34bd0942
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "Events.h" #include "Events.h"
#include "Holder.h" #include "Holder.h"
#include "Args.h" #include "Args.h"
#include "Utils.h"
#include "compext/Compext.h" #include "compext/Compext.h"
#include <nx/NXpack.h> #include <nx/NXpack.h>
...@@ -501,7 +502,7 @@ Bool nxagentDestroyPixmap(PixmapPtr pPixmap) ...@@ -501,7 +502,7 @@ Bool nxagentDestroyPixmap(PixmapPtr pPixmap)
FreeResource(pPixmapPriv -> mid, RT_NONE); FreeResource(pPixmapPriv -> mid, RT_NONE);
} }
free(pPixmap); SAFE_free(pPixmap);
return True; return True;
} }
...@@ -1092,7 +1093,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap) ...@@ -1092,7 +1093,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap)
{ {
FatalError("XGetImage: Failed.\n"); FatalError("XGetImage: Failed.\n");
free(data); SAFE_free(data);
return False; return False;
} }
...@@ -1168,7 +1169,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap) ...@@ -1168,7 +1169,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap)
XDestroyImage(image); XDestroyImage(image);
} }
free(data); SAFE_free(data);
} }
else else
{ {
...@@ -1265,7 +1266,7 @@ void nxagentSynchronizeShmPixmap(DrawablePtr pDrawable, int xPict, int yPict, ...@@ -1265,7 +1266,7 @@ void nxagentSynchronizeShmPixmap(DrawablePtr pDrawable, int xPict, int yPict,
nxagentPutImage(pDrawable, pGC, depth, xPict, yPict, nxagentPutImage(pDrawable, pGC, depth, xPict, yPict,
width, height, 0, format, data); width, height, 0, format, data);
free(data); SAFE_free(data);
} }
#ifdef WARNING #ifdef WARNING
else else
...@@ -1413,7 +1414,7 @@ FIXME: If the pixmap has a different depth from the window, the ...@@ -1413,7 +1414,7 @@ FIXME: If the pixmap has a different depth from the window, the
fprintf(stderr, "nxagentPixmapOnShadowDisplay: XCreateImage failed.\n"); fprintf(stderr, "nxagentPixmapOnShadowDisplay: XCreateImage failed.\n");
#endif #endif
free(data); SAFE_free(data);
return False; return False;
} }
...@@ -1572,7 +1573,7 @@ Bool nxagentFbOnShadowDisplay(void) ...@@ -1572,7 +1573,7 @@ Bool nxagentFbOnShadowDisplay(void)
fprintf(stderr, "nxagentFbOnShadowDisplay: XCreateImage failed.\n"); fprintf(stderr, "nxagentFbOnShadowDisplay: XCreateImage failed.\n");
#endif #endif
free(data); SAFE_free(data);
return False; return False;
} }
......
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