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 313973 Details for
Bug 458677
Memory leaks in index code doing indexed & range & matching rule searches
[?]
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
diffs.bug458677 (text/plain), 3.42 KB, created by
Rich Megginson
on 2008-08-11 14:58:08 UTC
(
hide
)
Description:
diffs
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2008-08-11 14:58:08 UTC
Size:
3.42 KB
patch
obsolete
>Index: ldapserver/ldap/servers/slapd/back-ldbm/index.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/index.c,v >retrieving revision 1.15 >diff -u -8 -r1.15 index.c >--- ldapserver/ldap/servers/slapd/back-ldbm/index.c 15 Jul 2008 16:49:43 -0000 1.15 >+++ ldapserver/ldap/servers/slapd/back-ldbm/index.c 9 Aug 2008 15:30:23 -0000 >@@ -1042,17 +1042,17 @@ > DB *db; > DB_TXN *db_txn = NULL; > DBC *dbc = NULL; > DBT lowerkey = {0}; > DBT upperkey = {0}; > DBT cur_key = {0}; > DBT data = {0} ; > IDList *idl= NULL; >- char *prefix; >+ char *prefix = NULL; > char *realbuf, *nextrealbuf; > size_t reallen, nextreallen; > size_t plen; > ID i; > struct attrinfo *ai = NULL; > int lookthrough_limit = -1; /* default no limit */ > int retry_count = 0; > int is_and = 0; >@@ -1095,46 +1095,53 @@ > case SLAPI_OP_LESS_OR_EQUAL: > case SLAPI_OP_GREATER_OR_EQUAL: > case SLAPI_OP_GREATER: > break; > default: > LDAPDebug( LDAP_DEBUG_ANY, > "<= index_range_read(%s,%s) NULL (operator %i)\n", > type, prefix, operator ); >+ free_prefix(prefix); > return( NULL ); > } > ainfo_get( be, type, &ai ); >- if (ai == NULL) return NULL; >+ if (ai == NULL) { >+ free_prefix(prefix); >+ return NULL; >+ } > LDAPDebug( LDAP_DEBUG_ARGS, " indextype: \"%s\" indexmask: 0x%x\n", > indextype, ai->ai_indexmask, 0 ); > if ( !is_indexed( indextype, ai->ai_indexmask, ai->ai_index_rules )) { > idl = idl_allids( be ); > LDAPDebug( LDAP_DEBUG_TRACE, > "<= index_range_read(%s,%s) %lu candidates (allids)\n", > type, prefix, (u_long)IDL_NIDS(idl) ); >+ free_prefix(prefix); > return( idl ); > } > if ( (*err = dblayer_get_index_file( be, ai, &db, DBOPEN_CREATE )) != 0 ) { > LDAPDebug( LDAP_DEBUG_ANY, > "<= index_range_read(%s,%s) NULL (could not open index file)\n", > type, prefix, 0 ); >+ free_prefix(prefix); > return( NULL ); /* why not allids? */ > } > if (NULL != txn) { > db_txn = txn->back_txn_txn; > } > /* get a cursor so we can walk over the table */ > *err = db->cursor(db,db_txn,&dbc,0); > if (0 != *err ) { > ldbm_nasty(errmsg, 1060, *err); > LDAPDebug( LDAP_DEBUG_ANY, > "<= index_range_read(%s,%s) NULL: db->cursor() == %i\n", > type, prefix, *err ); > dblayer_release_index_file( be, ai, db ); >+ free_prefix(prefix); > return( NULL ); /* why not allids? */ > } > > /* set up the starting and ending keys for a range search */ > if ( val != NULL ) { /* compute a key from val */ > const size_t vlen = val->bv_len; > reallen = plen + vlen + 1; > realbuf = slapi_ch_malloc( reallen ); >@@ -1372,16 +1379,17 @@ > { > LDAPDebug( LDAP_DEBUG_FILTER, > " idl->b_ids[%d]=%d\n", i, idl->b_ids[i], 0); > } > } > } > #endif > error: >+ free_prefix(prefix); > DBT_FREE_PAYLOAD(cur_key); > DBT_FREE_PAYLOAD(upperkey); > > dblayer_release_index_file( be, ai, db ); > > LDAPDebug( LDAP_DEBUG_TRACE, "<= index_range_read(%s,%s) %lu candidates\n", > type, prefix, (u_long)IDL_NIDS(idl) ); > return( idl );
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 458677
: 313973 |
314150
|
315150