aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-07-22 22:19:15 +0200
committerUlrich Sibiller <uli42@gmx.de>2019-08-06 21:57:32 +0200
commit633d040971ad470e8cd74d31fc203d1312ec5550 (patch)
treee172e28b8f0ab250ba10938c8d0c47e64a3b0ce1 /nx-X11
parent122fbd3e1b49b4eca142052350336694dae17585 (diff)
downloadnx-libs-633d040971ad470e8cd74d31fc203d1312ec5550.tar.gz
nx-libs-633d040971ad470e8cd74d31fc203d1312ec5550.tar.bz2
nx-libs-633d040971ad470e8cd74d31fc203d1312ec5550.zip
Args.c: use SAFE_free
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index 161403cd0..1d8beca3d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -195,7 +195,7 @@ int ddxProcessArgument(int argc, char *argv[], int i)
{
char *basec = strdup(argv[0]);
nxagentProgName = strdup(basename(basec));
- free(basec);
+ SAFE_free(basec);
/*
* Check if we are running as X2Go Agent
@@ -270,7 +270,7 @@ int ddxProcessArgument(int argc, char *argv[], int i)
{
nxagentParseOptionString(envOptions);
- free(envOptions);
+ SAFE_free(envOptions);
}
for (j = 0; j < argc; j++)
@@ -378,8 +378,7 @@ int ddxProcessArgument(int argc, char *argv[], int i)
{
if (++i < argc)
{
- free(nxagentOptionsFilenameOrString);
- nxagentOptionsFilenameOrString = NULL;
+ SAFE_free(nxagentOptionsFilenameOrString);
if (-1 == asprintf(&nxagentOptionsFilenameOrString, "%s", argv[i]))
{
@@ -716,8 +715,7 @@ int ddxProcessArgument(int argc, char *argv[], int i)
{
if (++i < argc)
{
- free(nxagentKeyboard);
- nxagentKeyboard = NULL;
+ SAFE_free(nxagentKeyboard);
nxagentKeyboard = strdup(argv[i]);
if (nxagentKeyboard == NULL)
@@ -1574,7 +1572,7 @@ static void nxagentParseSingleOption(char *name, char *value)
ddxProcessArgument(argc, argv, 0);
- free(argv[0]);
+ SAFE_free(argv[0]);
}
static void nxagentParseOptionString(char *string)
@@ -1761,7 +1759,7 @@ void nxagentProcessOptionsFile(char * filename)
nxagentProcessOptionsFileExit:
- free(data);
+ SAFE_free(data);
if (file)
{