summaryrefslogtreecommitdiff
path: root/src/shutdown.c
diff options
context:
space:
mode:
authorwalter harms <wharms@bfs.de>2017-09-08 19:59:17 +0200
committerEmil Velikov <emil.l.velikov@gmail.com>2017-09-14 09:03:11 +0100
commit936dcaac07f7db569ed91a34e0a4b5944aac205f (patch)
tree0edc1bf5f7a2f6671dbf5b1decce37e8281be9a2 /src/shutdown.c
parent43644931cb9cb5cc92391f6f5431535b9b7a3f24 (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/shutdown.c')
-rw-r--r--src/shutdown.c44
1 files changed, 11 insertions, 33 deletions
diff --git a/src/shutdown.c b/src/shutdown.c
index 3fafb10..3f0880b 100644
--- a/src/shutdown.c
+++ b/src/shutdown.c
@@ -282,39 +282,17 @@ _IceFreeConnection (
if (iceConn->trans_conn)
_IceTransClose (iceConn->trans_conn);
- if (iceConn->connection_string)
- free (iceConn->connection_string);
-
- if (iceConn->vendor)
- free (iceConn->vendor);
-
- if (iceConn->release)
- free (iceConn->release);
-
- if (iceConn->inbuf)
- free (iceConn->inbuf);
-
- if (iceConn->outbuf)
- free (iceConn->outbuf);
-
- if (iceConn->scratch)
- free (iceConn->scratch);
-
- if (iceConn->process_msg_info)
- free (iceConn->process_msg_info);
-
- if (iceConn->connect_to_you)
- free (iceConn->connect_to_you);
-
- if (iceConn->protosetup_to_you)
- free (iceConn->protosetup_to_you);
-
- if (iceConn->connect_to_me)
- free (iceConn->connect_to_me);
-
- if (iceConn->protosetup_to_me)
- free (iceConn->protosetup_to_me);
-
+ free (iceConn->connection_string);
+ free (iceConn->vendor);
+ free (iceConn->release);
+ free (iceConn->inbuf);
+ free (iceConn->outbuf);
+ free (iceConn->scratch);
+ free (iceConn->process_msg_info);
+ free (iceConn->connect_to_you);
+ free (iceConn->protosetup_to_you);
+ free (iceConn->connect_to_me);
+ free (iceConn->protosetup_to_me);
free (iceConn);
}