aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-10-04 21:05:49 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-01 16:19:54 +0100
commit5929dfdebf9c9914187f1b41f70d0b721def7122 (patch)
tree682d4796762a1d8e061ee3b42f2cc55cbc591a83 /nx-X11
parent9deebfc8faf3572747fb08fe13ced80ff51cad32 (diff)
downloadnx-libs-5929dfdebf9c9914187f1b41f70d0b721def7122.tar.gz
nx-libs-5929dfdebf9c9914187f1b41f70d0b721def7122.tar.bz2
nx-libs-5929dfdebf9c9914187f1b41f70d0b721def7122.zip
AuRead.c: remove redundant null check on calling free()
Backport of this commit: commit 7ba7085b4f01f3cd72008712a5333ea3f0edfd88 Author: walter harms <wharms@bfs.de> Date: Sat Oct 28 19:14:22 2017 +0200 AuRead.c: remove redundant null check on calling free() this removes simply unneeded code from XauReadAuth Signed-off-by: Walter Harms <wharms@bfs.de> Reviewed-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/lib/src/AuRead.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/nx-X11/lib/src/AuRead.c b/nx-X11/lib/src/AuRead.c
index d63dc96e9..993aa24b9 100644
--- a/nx-X11/lib/src/AuRead.c
+++ b/nx-X11/lib/src/AuRead.c
@@ -120,25 +120,25 @@ FILE *auth_file;
if (read_counted_string (&local.address_length, &local.address, auth_file) == 0)
return 0;
if (read_counted_string (&local.number_length, &local.number, auth_file) == 0) {
- if (local.address) free (local.address);
+ free (local.address);
return 0;
}
if (read_counted_string (&local.name_length, &local.name, auth_file) == 0) {
- if (local.address) free (local.address);
- if (local.number) free (local.number);
+ free (local.address);
+ free (local.number);
return 0;
}
if (read_counted_string (&local.data_length, &local.data, auth_file) == 0) {
- if (local.address) free (local.address);
- if (local.number) free (local.number);
- if (local.name) free (local.name);
+ free (local.address);
+ free (local.number);
+ free (local.name);
return 0;
}
ret = (Xauth *) malloc (sizeof (Xauth));
if (!ret) {
- if (local.address) free (local.address);
- if (local.number) free (local.number);
- if (local.name) free (local.name);
+ free (local.address);
+ free (local.number);
+ free (local.name);
if (local.data) {
bzero (local.data, local.data_length);
free (local.data);