diff options
author | walter harms <wharms@bfs.de> | 2017-10-28 19:14:22 +0200 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2017-10-30 15:49:41 +0000 |
commit | 7ba7085b4f01f3cd72008712a5333ea3f0edfd88 (patch) | |
tree | 46675841751c3f61445633ddab436f85c9cde54e | |
parent | cf6cc845ba12dbfa7d29a4eab810888838a9749b (diff) |
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>
-rw-r--r-- | AuRead.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -77,25 +77,25 @@ XauReadAuth (FILE *auth_file) if (read_counted_string (&local.address_length, &local.address, auth_file) == 0) return NULL; if (read_counted_string (&local.number_length, &local.number, auth_file) == 0) { - if (local.address) free (local.address); + free (local.address); return NULL; } 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 NULL; } 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 NULL; } 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); |