You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2005/03/30 00:52:15 UTC

svn commit: r159441 - directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequestPOJO.java

Author: elecharny
Date: Tue Mar 29 14:52:15 2005
New Revision: 159441

URL: http://svn.apache.org/viewcvs?view=rev&rev=159441
Log:
Added a test in the free function (which throwed a NPE if freeing a unallocated structure)

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequestPOJO.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequestPOJO.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequestPOJO.java?view=diff&r1=159440&r2=159441
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequestPOJO.java (original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindRequestPOJO.java Tue Mar 29 14:52:15 2005
@@ -121,8 +121,11 @@
         version = 0;
         
         // free the authentication POJO
-        authentication.free();
-        authentication = null;
+        if (authentication != null)
+        {
+        	authentication.free();
+            authentication = null;
+        }
         
         // put back the object in the pool 
         super.free();