diff options
author | walter harms <wharms@bfs.de> | 2017-09-08 19:59:17 +0200 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2017-09-14 09:03:11 +0100 |
commit | 936dcaac07f7db569ed91a34e0a4b5944aac205f (patch) | |
tree | 0edc1bf5f7a2f6671dbf5b1decce37e8281be9a2 /src/authutil.c | |
parent | 43644931cb9cb5cc92391f6f5431535b9b7a3f24 (diff) |
Drop NULL check prior to free()
free() can handle NULL just fine - remove the check.
Signed-off-by: Walter Harms <wharms@bfs.de>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'src/authutil.c')
-rw-r--r-- | src/authutil.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/authutil.c b/src/authutil.c index 89ba199..e3bad01 100644 --- a/src/authutil.c +++ b/src/authutil.c @@ -110,8 +110,8 @@ IceAuthFileName (void) if (size > bsize) { - if (buf) - free (buf); + + free (buf); buf = malloc (size); if (!buf) { bsize = 0; @@ -265,11 +265,11 @@ IceReadAuthFileEntry ( bad: - if (local.protocol_name) free (local.protocol_name); - if (local.protocol_data) free (local.protocol_data); - if (local.network_id) free (local.network_id); - if (local.auth_name) free (local.auth_name); - if (local.auth_data) free (local.auth_data); + free (local.protocol_name); + free (local.protocol_data); + free (local.network_id); + free (local.auth_name); + free (local.auth_data); return (NULL); } @@ -283,11 +283,11 @@ IceFreeAuthFileEntry ( { if (auth) { - if (auth->protocol_name) free (auth->protocol_name); - if (auth->protocol_data) free (auth->protocol_data); - if (auth->network_id) free (auth->network_id); - if (auth->auth_name) free (auth->auth_name); - if (auth->auth_data) free (auth->auth_data); + free (auth->protocol_name); + free (auth->protocol_data); + free (auth->network_id); + free (auth->auth_name); + free (auth->auth_data); free (auth); } } |