Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 315152 Details for
Bug 460381
various valgrind reported startup memory leaks
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
diffs
cvsdiffs (text/plain), 8.04 KB, created by
Rich Megginson
on 2008-08-27 21:28:42 UTC
(
hide
)
Description:
diffs
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2008-08-27 21:28:42 UTC
Size:
8.04 KB
patch
obsolete
>Index: ldapserver/ldap/servers/slapd/auth.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/auth.c,v >retrieving revision 1.9 >diff -u -8 -r1.9 auth.c >--- ldapserver/ldap/servers/slapd/auth.c 10 Nov 2006 23:45:40 -0000 1.9 >+++ ldapserver/ldap/servers/slapd/auth.c 27 Aug 2008 21:26:40 -0000 >@@ -285,18 +285,20 @@ > 0, 0, 0); > return; > } > client_auth_config_file = PR_smprintf("%s/certmap.conf", confdir); > if (NULL == client_auth_config_file) { > LDAPDebug (LDAP_DEBUG_ANY, > "client_auth_init: failed to duplicate \"%s/certmap\"\n", > confdir, 0, 0); >+ slapi_ch_free_string(&confdir); > return; > } >+ slapi_ch_free_string(&confdir); > } > err = ldaputil_init (client_auth_config_file, "", NULL, "slapd", NULL); > if (err != LDAPU_SUCCESS) { > LDAPDebug (LDAP_DEBUG_TRACE, "ldaputil_init(%s,...) %i\n", > client_auth_config_file, err, 0); > } else { > LDAPUVTable_t vtable = { > NULL /* ssl_init */, >Index: ldapserver/ldap/servers/slapd/dynalib.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/dynalib.c,v >retrieving revision 1.8 >diff -u -8 -r1.8 dynalib.c >--- ldapserver/ldap/servers/slapd/dynalib.c 18 Oct 2007 00:08:34 -0000 1.8 >+++ ldapserver/ldap/servers/slapd/dynalib.c 27 Aug 2008 21:26:40 -0000 >@@ -149,17 +149,17 @@ > static void > symload_report_error( const char *libpath, char *symbol, char *plugin, int libopen ) > { > char *errtext = NULL; > PRInt32 errlen; > > errlen = PR_GetErrorTextLength(); > if ( errlen > 0 ) { >- errtext = slapi_ch_malloc( errlen ); >+ errtext = slapi_ch_malloc( errlen+1 ); > if ( PR_GetErrorText( errtext ) > 0 ) { > LDAPDebug( LDAP_DEBUG_ANY, SLAPI_COMPONENT_NAME_NSPR " error %d: %s\n", > PR_GetError(), errtext, 0 ); > } > slapi_ch_free( (void **)&errtext ); > } > if ( libopen ) { > LDAPDebug( LDAP_DEBUG_ANY, >Index: ldapserver/ldap/servers/slapd/proto-slap.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v >retrieving revision 1.35 >diff -u -8 -r1.35 proto-slap.h >--- ldapserver/ldap/servers/slapd/proto-slap.h 30 Jun 2008 17:28:16 -0000 1.35 >+++ ldapserver/ldap/servers/slapd/proto-slap.h 27 Aug 2008 21:26:41 -0000 >@@ -941,16 +941,18 @@ > void slapd_pk11_FreeSymKey(PK11SymKey *key); > void slapd_pk11_DestroyContext(PK11Context *context, PRBool freeit); > SECItem *slapd_pk11_ParamFromIV(CK_MECHANISM_TYPE type,SECItem *iv); > PK11SymKey *slapd_pk11_PubUnwrapSymKey(SECKEYPrivateKey *wrappingKey, SECItem *wrappedKey,CK_MECHANISM_TYPE target, CK_ATTRIBUTE_TYPE operation, int keySize); > unsigned slapd_SECKEY_PublicKeyStrength(SECKEYPublicKey *pubk); > SECStatus slapd_pk11_Finalize(PK11Context *context); > SECStatus slapd_pk11_DigestFinal(PK11Context *context, unsigned char *data,unsigned int *outLen, unsigned int length); > void slapd_SECITEM_FreeItem (SECItem *zap, PRBool freeit); >+void slapd_pk11_DestroyPrivateKey(SECKEYPrivateKey *key); >+void slapd_pk11_DestroyPublicKey(SECKEYPublicKey *key); > > /* > * start_tls_extop.c > */ > int start_tls( Slapi_PBlock *pb ); > int start_tls_graceful_closure( Connection *conn, Slapi_PBlock *pb, int is_initiator ); > int start_tls_register_plugin(); > int start_tls_init( Slapi_PBlock *pb ); >Index: ldapserver/ldap/servers/slapd/security_wrappers.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/security_wrappers.c,v >retrieving revision 1.5 >diff -u -8 -r1.5 security_wrappers.c >--- ldapserver/ldap/servers/slapd/security_wrappers.c 10 Nov 2006 23:45:40 -0000 1.5 >+++ ldapserver/ldap/servers/slapd/security_wrappers.c 27 Aug 2008 21:26:41 -0000 >@@ -369,8 +369,17 @@ > } > > void > slapd_SECITEM_FreeItem (SECItem *zap, PRBool freeit) > { > SECITEM_FreeItem(zap,freeit); > } > >+void slapd_pk11_DestroyPrivateKey(SECKEYPrivateKey *key) >+{ >+ SECKEY_DestroyPrivateKey(key); >+} >+ >+void slapd_pk11_DestroyPublicKey(SECKEYPublicKey *key) >+{ >+ SECKEY_DestroyPublicKey(key); >+} >Index: ldapserver/ldap/servers/slapd/ssl.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/ssl.c,v >retrieving revision 1.17 >diff -u -8 -r1.17 ssl.c >--- ldapserver/ldap/servers/slapd/ssl.c 19 Oct 2007 18:20:45 -0000 1.17 >+++ ldapserver/ldap/servers/slapd/ssl.c 27 Aug 2008 21:26:41 -0000 >@@ -588,35 +588,38 @@ > slot = slapd_pk11_getInternalKeySlot(); > else > slot = slapd_pk11_findSlotByName(token); > } else { > errorCode = PR_GetError(); > slapd_SSL_warn("Security Initialization: Unable to get token (" > SLAPI_COMPONENT_NAME_NSPR " error %d - %s)", > errorCode, slapd_pr_strerror(errorCode)); >+ freeChildren(family_list); > return -1; > } > > slapi_ch_free((void **) &token); > > if (!slot) { > errorCode = PR_GetError(); > slapd_SSL_warn("Security Initialization: Unable to find slot (" > SLAPI_COMPONENT_NAME_NSPR " error %d - %s)", > errorCode, slapd_pr_strerror(errorCode)); >+ freeChildren(family_list); > return -1; > } > /* authenticate */ > if(slapd_pk11_authenticate(slot, PR_TRUE, NULL) != SECSuccess) > { > errorCode = PR_GetError(); > slapd_SSL_warn("Security Initialization: Unable to authenticate (" > SLAPI_COMPONENT_NAME_NSPR " error %d - %s)", > errorCode, slapd_pr_strerror(errorCode)); >+ freeChildren(family_list); > return -1; > } > } > freeChildren( family_list ); > } > freeConfigEntry( &entry ); > > if(SSLPLCY_Install() != PR_SUCCESS) { >@@ -858,16 +861,20 @@ > cert_name, *family, errorCode, > slapd_pr_strerror(errorCode)); > } > } > if (cert) { > CERT_DestroyCertificate(cert); > cert = NULL; > } >+ if (key) { >+ slapd_pk11_DestroyPrivateKey(key); >+ key = NULL; >+ } > slapi_ch_free((void **) &personality); > if (SECSuccess != rv) { > freeConfigEntry( &e ); > continue; > } > nFamilies++; > freeConfigEntry( &e ); > } >Index: ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c,v >retrieving revision 1.11 >diff -u -8 -r1.11 ldbm_attrcrypt.c >--- ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c 19 Oct 2007 02:09:24 -0000 1.11 >+++ ldapserver/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c 27 Aug 2008 21:26:41 -0000 >@@ -463,25 +463,30 @@ > ret = attrcrypt_fetch_public_key(&public_key); > if (!ret) { > for (ace = attrcrypt_cipher_list; ace && ace->cipher_number && !ret; ace++) { > /* Make a state object for this cipher */ > attrcrypt_cipher_state *acs = (attrcrypt_cipher_state *) slapi_ch_calloc(sizeof(attrcrypt_cipher_state),1); > ret = attrcrypt_cipher_init(li, ace, private_key, public_key, acs); > if (ret) { > LDAPDebug(LDAP_DEBUG_ANY,"Failed to initialize cipher %s in attrcrypt_init\n", ace->cipher_display_name, 0, 0); >+ slapi_ch_free((void **)&acs); > } else { > /* Since we succeeded, add the acs to the backend instance list */ > attrcrypt_acs_list_add(li,acs); > LDAPDebug(LDAP_DEBUG_TRACE,"Initialized cipher %s in attrcrypt_init\n", ace->cipher_display_name, 0, 0); > } > > } > } >- } >+ slapd_pk11_DestroyPublicKey(public_key); >+ public_key = NULL; >+ } >+ slapd_pk11_DestroyPrivateKey(private_key); >+ private_key = NULL; > } else { > if (li->attrcrypt_configured) { > LDAPDebug(LDAP_DEBUG_ANY,"Warning: encryption is configured in backend %s, but because SSL is not enabled, database encryption is not available and the configuration will be overridden.\n", li->inst_name, 0, 0); > } > } > LDAPDebug(LDAP_DEBUG_TRACE,"<- attrcrypt_init : %d\n", ret, 0, 0); > return ret; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 460381
: 315152 |
315155
|
338798