Print this page
3285 memory leaks in libsldap

@@ -20,10 +20,11 @@
  */
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  * Copyright 2012 Milan Jurik. All rights reserved.
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
  */
 
 #define __STANDALONE_MODULE__
 
 #include <stdio.h>

@@ -1448,10 +1449,11 @@
                         (void) ldap_msgfree(resultMsg);
                         resultMsg = NULL;
                 }
 
                 __s_api_conn_user_free(cu);
+                DropConnection(sessionId, NS_LDAP_NEW_CONN);
                 return (NS_LDAP_OP_FAILED);
         }
         __s_api_conn_user_free(cu);
 
         ret_code = convert_to_door_line(session->ld,