[X2Go-Commits] [nx-libs] 148/219: Error.c: use SAFE_free
git-admin at x2go.org
git-admin at x2go.org
Sat Sep 28 12:10:41 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit 122fbd3e1b49b4eca142052350336694dae17585
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Mon Jul 22 22:17:25 2019 +0200
Error.c: use SAFE_free
---
nx-X11/programs/Xserver/hw/nxagent/Error.c | 13 +++++++------
1 file 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;
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list