aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-07-22 22:17:25 +0200
committerUlrich Sibiller <uli42@gmx.de>2019-08-06 21:57:32 +0200
commit122fbd3e1b49b4eca142052350336694dae17585 (patch)
tree656739f06d8bd30215766384d9ce06cd5f2e46bf /nx-X11/programs/Xserver/hw
parentdde4e7636bb48360696b1886978c7c4626dd40f3 (diff)
downloadnx-libs-122fbd3e1b49b4eca142052350336694dae17585.tar.gz
nx-libs-122fbd3e1b49b4eca142052350336694dae17585.tar.bz2
nx-libs-122fbd3e1b49b4eca142052350336694dae17585.zip
Error.c: use SAFE_free
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Error.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.c b/nx-X11/programs/Xserver/hw/nxagent/Error.c
index bc58ef849..0d4ef3107 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Error.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c
@@ -42,6 +42,7 @@
#include "Error.h"
#include "Args.h"
+#include "Utils.h"
/*
* Set here the required log level.
@@ -425,7 +426,7 @@ char *nxagentGetRootPath(void)
"home directory '%s'.\n", homeEnv);
#endif
- free(homeEnv);
+ SAFE_free(homeEnv);
return NULL;
}
@@ -436,7 +437,7 @@ char *nxagentGetRootPath(void)
snprintf(nxagentRootDir, DEFAULT_STRING_LENGTH, "%s/.nx", homeEnv);
- free(homeEnv);
+ SAFE_free(homeEnv);
/*
* Create the NX root directory.
@@ -534,14 +535,14 @@ char *nxagentGetSessionPath(void)
nxagentSessionDir);
#endif
- free(rootPath);
+ SAFE_free(rootPath);
return NULL;
}
snprintf(nxagentSessionDir, DEFAULT_STRING_LENGTH, "%s/C-%s", rootPath, nxagentSessionId);
- free(rootPath);
+ SAFE_free(rootPath);
if ((stat(nxagentSessionDir, &dirStat) == -1) && (errno == ENOENT))
{
@@ -595,14 +596,14 @@ void nxagentGetClientsPath(void)
fprintf(stderr, "nxagentGetClientsPath: PANIC! Invalid value for the NX clients Log File Path ''.\n");
#endif
- free(sessionPath);
+ SAFE_free(sessionPath);
return;
}
snprintf(nxagentClientsLogName, NXAGENTCLIENTSLOGNAMELENGTH, "%s/clients", sessionPath);
- free(sessionPath);
+ SAFE_free(sessionPath);
}
return;