aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-10-30 19:30:02 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-15 12:17:19 +0100
commit917d4b3c58ef52eb8f945fc4c6ad473dc9566d3e (patch)
tree9dbe021acf6b58d6d9374f6800bbe9ecb8e8e9ef /nx-X11/programs/Xserver/hw/nxagent
parent4ebd5fcd30df54c597821d67d3501b6146e51b34 (diff)
downloadnx-libs-917d4b3c58ef52eb8f945fc4c6ad473dc9566d3e.tar.gz
nx-libs-917d4b3c58ef52eb8f945fc4c6ad473dc9566d3e.tar.bz2
nx-libs-917d4b3c58ef52eb8f945fc4c6ad473dc9566d3e.zip
Rootless.c: Fatal error if malloc fails
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Rootless.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
index 19560ff50..0c04b99a7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c
@@ -469,8 +469,12 @@ int nxagentExportProperty(WindowPtr pWin,
#ifdef _XSERVER64
else if (strcmp(typeS, "CARDINAL") == 0 || strcmp(typeS, "WM_SIZE_HINTS") == 0)
{
- /* FIXME: is it okay here to ignore malloc fails? */
unsigned long *buffer = malloc(nUnits * sizeof(*buffer));
+ if (buffer == NULL)
+ {
+ FatalError("%s: malloc() failed.", __func__);
+ }
+
int *input = value;
if (buffer)