directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1470172 - /directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java
Date Sat, 20 Apr 2013 15:11:31 GMT
Author: kayyagari
Date: Sat Apr 20 15:11:31 2013
New Revision: 1470172

URL: http://svn.apache.org/r1470172
Log:
check for null reference before closing

Modified:
    directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java

Modified: directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java?rev=1470172&r1=1470171&r2=1470172&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java
(original)
+++ directory/apacheds/trunk/kerberos-client2/src/main/java/org/apache/directory/kerberos/client/KerberosChannel.java
Sat Apr 20 15:11:31 2013
@@ -129,11 +129,17 @@ public class KerberosChannel
     {
         if( useUdp )
         {
-            udpSocket.close();
+            if( udpSocket != null )
+            {
+                udpSocket.close();
+            }
         }
         else
         {
-            tcpSocket.close();
+            if( tcpSocket != null )
+            {
+                tcpSocket.close();
+            }
         }
     }
 }



Mime
View raw message