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/process.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/process.c')
-rw-r--r-- | src/process.c | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/src/process.c b/src/process.c index 5e00be3..fae081b 100644 --- a/src/process.c +++ b/src/process.c @@ -1036,8 +1036,7 @@ ProcessConnectionSetup ( iceConn->connection_status = IceConnectRejected; } - if (hostname) - free (hostname); + free (hostname); } if (iceConn->connection_status == IceConnectRejected) @@ -1090,8 +1089,7 @@ ProcessConnectionSetup ( if (authData && authDataLen > 0) free (authData); - if (errorString) - free (errorString); + free (errorString); } if (accept_setup_now) @@ -1379,8 +1377,7 @@ ProcessAuthReply ( status = IcePaAuthAccepted; } - if (hostname) - free (hostname); + free (hostname); } if (status != IcePaAuthAccepted) @@ -1454,8 +1451,7 @@ ProcessAuthReply ( status = IcePaAuthAccepted; } - if (hostname) - free (hostname); + free (hostname); } if (status == IcePaAuthRejected) @@ -1569,18 +1565,15 @@ ProcessAuthReply ( _IceErrorSetupFailed (iceConn, ICE_ProtocolSetup, failureReason); - if (failureReason) - free (failureReason); + free (failureReason); } } if (free_setup_info) { - if (iceConn->protosetup_to_me->his_vendor) - free (iceConn->protosetup_to_me->his_vendor); - if (iceConn->protosetup_to_me->his_release) - free (iceConn->protosetup_to_me->his_release); + free (iceConn->protosetup_to_me->his_vendor); + free (iceConn->protosetup_to_me->his_release); free (iceConn->protosetup_to_me); iceConn->protosetup_to_me = NULL; } @@ -1597,8 +1590,8 @@ ProcessAuthReply ( if (authData && authDataLen > 0) free (authData); - if (errorString) - free (errorString); + + free (errorString); IceDisposeCompleteMessage (iceConn, replyData); return (0); @@ -2081,8 +2074,7 @@ ProcessProtocolSetup ( ICE_ProtocolSetup, "None of the authentication protocols specified are supported and host-based authentication failed"); } - if (hostname) - free (hostname); + free (hostname); } } else @@ -2128,8 +2120,8 @@ ProcessProtocolSetup ( if (authData && authDataLen > 0) free (authData); - if (errorString) - free (errorString); + + free (errorString); } if (accept_setup_now) @@ -2212,16 +2204,13 @@ ProcessProtocolSetup ( _IceErrorSetupFailed (iceConn, ICE_ProtocolSetup, failureReason); - if (failureReason) - free (failureReason); + free (failureReason); } } - if (vendor) - free (vendor); - if (release) - free (release); + free (vendor); + free (release); if (hisAuthCount > 0) { |