aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-08-27 08:27:42 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-08-27 08:27:42 +0200
commit6f80a06fb96725e7eadf846bf0e727821aadbf47 (patch)
tree64846b3be22e28618ffe285db02d55fa5d4de709 /nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
parent8b15d574b49857cdf4df0fd813d68b750d8aee5f (diff)
parentf39b81d31bc7d0427ea9cca04d0e4a21579d7383 (diff)
downloadnx-libs-6f80a06fb96725e7eadf846bf0e727821aadbf47.tar.gz
nx-libs-6f80a06fb96725e7eadf846bf0e727821aadbf47.tar.bz2
nx-libs-6f80a06fb96725e7eadf846bf0e727821aadbf47.zip
Merge branch 'uli42-pr/safe_free' into 3.6.x
Attributes GH PR #826: https://github.com/ArcticaProject/nx-libs/pull/826
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Pixmap.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmap.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
index 653426ebb..58fea6c05 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
@@ -49,6 +49,7 @@
#include "Events.h"
#include "Holder.h"
#include "Args.h"
+#include "Utils.h"
#include "compext/Compext.h"
#include <nx/NXpack.h>
@@ -501,7 +502,7 @@ Bool nxagentDestroyPixmap(PixmapPtr pPixmap)
FreeResource(pPixmapPriv -> mid, RT_NONE);
}
- free(pPixmap);
+ SAFE_free(pPixmap);
return True;
}
@@ -1092,7 +1093,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap)
{
FatalError("XGetImage: Failed.\n");
- free(data);
+ SAFE_free(data);
return False;
}
@@ -1168,7 +1169,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap)
XDestroyImage(image);
}
- free(data);
+ SAFE_free(data);
}
else
{
@@ -1265,7 +1266,7 @@ void nxagentSynchronizeShmPixmap(DrawablePtr pDrawable, int xPict, int yPict,
nxagentPutImage(pDrawable, pGC, depth, xPict, yPict,
width, height, 0, format, data);
- free(data);
+ SAFE_free(data);
}
#ifdef WARNING
else
@@ -1413,7 +1414,7 @@ FIXME: If the pixmap has a different depth from the window, the
fprintf(stderr, "nxagentPixmapOnShadowDisplay: XCreateImage failed.\n");
#endif
- free(data);
+ SAFE_free(data);
return False;
}
@@ -1572,7 +1573,7 @@ Bool nxagentFbOnShadowDisplay(void)
fprintf(stderr, "nxagentFbOnShadowDisplay: XCreateImage failed.\n");
#endif
- free(data);
+ SAFE_free(data);
return False;
}