Print this page
3285 memory leaks in libsldap

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libsldap/common/ns_standalone.c
          +++ new/usr/src/lib/libsldap/common/ns_standalone.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   * Copyright 2012 Milan Jurik. All rights reserved.
       25 + * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
  25   26   */
  26   27  
  27   28  #define __STANDALONE_MODULE__
  28   29  
  29   30  #include <stdio.h>
  30   31  #include <sys/types.h>
  31   32  #include <stdlib.h>
  32   33  #include <libintl.h>
  33   34  #include <string.h>
  34   35  #include <ctype.h>
↓ open down ↓ 1408 lines elided ↑ open up ↑
1443 1444                      NS_LDAP_OP_FAILED,
1444 1445                      strdup(errmsg),
1445 1446                      NS_LDAP_MEMORY);
1446 1447  
1447 1448                  if (resultMsg) {
1448 1449                          (void) ldap_msgfree(resultMsg);
1449 1450                          resultMsg = NULL;
1450 1451                  }
1451 1452  
1452 1453                  __s_api_conn_user_free(cu);
     1454 +                DropConnection(sessionId, NS_LDAP_NEW_CONN);
1453 1455                  return (NS_LDAP_OP_FAILED);
1454 1456          }
1455 1457          __s_api_conn_user_free(cu);
1456 1458  
1457 1459          ret_code = convert_to_door_line(session->ld,
1458 1460              resultMsg,
1459 1461              INCLUDE_ATTR_NAMES,
1460 1462              NOT_PROFILE,
1461 1463              root_dse);
1462 1464          if (ret_code == NS_LDAP_NOTFOUND) {
↓ open down ↓ 1004 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX