Print this page
3285 memory leaks in libsldap

*** 19,28 **** --- 19,29 ---- * CDDL HEADER END */ /* * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2012 Nexenta Systems, Inc. All rights reserved. */ #include <stdlib.h> #include <stdio.h> #include <errno.h>
*** 473,486 **** if (cred == NULL) { (void) fprintf(fp, "tid= %d: printCred: cred is NULL\n", t); return; } ! (void) fprintf(fp, "tid= %d: AuthType=%d", t, cred->auth.type); ! (void) fprintf(fp, "tid= %d: TlsType=%d", t, cred->auth.tlstype); ! (void) fprintf(fp, "tid= %d: SaslMech=%d", t, cred->auth.saslmech); ! (void) fprintf(fp, "tid= %d: SaslOpt=%d", t, cred->auth.saslopt); if (cred->hostcertpath) (void) fprintf(fp, "tid= %d: hostCertPath=%s\n", t, cred->hostcertpath); if (cred->cred.unix_cred.userID) (void) fprintf(fp, "tid= %d: userID=%s\n", --- 474,487 ---- if (cred == NULL) { (void) fprintf(fp, "tid= %d: printCred: cred is NULL\n", t); return; } ! (void) fprintf(fp, "tid= %d: AuthType=%d\n", t, cred->auth.type); ! (void) fprintf(fp, "tid= %d: TlsType=%d\n", t, cred->auth.tlstype); ! (void) fprintf(fp, "tid= %d: SaslMech=%d\n", t, cred->auth.saslmech); ! (void) fprintf(fp, "tid= %d: SaslOpt=%d\n", t, cred->auth.saslopt); if (cred->hostcertpath) (void) fprintf(fp, "tid= %d: hostCertPath=%s\n", t, cred->hostcertpath); if (cred->cred.unix_cred.userID) (void) fprintf(fp, "tid= %d: userID=%s\n",
*** 699,709 **** char *serverAddrType = NULL, **bindHost = NULL; if (conp == NULL || errorp == NULL || auth == NULL) return (NS_LDAP_INVALID_PARAM); ! *errorp = NULL; *conp = NULL; (void) memset(&sinfo, 0, sizeof (sinfo)); if ((id = findConnection(flags, serverAddr, auth, &con)) != -1) { /* connection found in cache */ --- 700,711 ---- char *serverAddrType = NULL, **bindHost = NULL; if (conp == NULL || errorp == NULL || auth == NULL) return (NS_LDAP_INVALID_PARAM); ! if (*errorp) ! __ns_ldap_freeError(errorp); *conp = NULL; (void) memset(&sinfo, 0, sizeof (sinfo)); if ((id = findConnection(flags, serverAddr, auth, &con)) != -1) { /* connection found in cache */