-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 6494 - Various errors when using extended matching rule on vlv sort filter #6495
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -222,7 +222,7 @@ | |
} | ||
libpath = backend_implement_get_libpath(li, plgname); | ||
backend_implement_init = slapi_ch_smprintf("%s_init", plgname); | ||
backend_implement_init_x = sym_load(libpath, backend_implement_init, "dblayer_implement", 1); | ||
slapi_ch_free_string(&backend_implement_init); | ||
if (libpath != li->li_plugin->plg_libpath) { | ||
slapi_ch_free_string(&libpath); | ||
|
@@ -385,7 +385,7 @@ | |
} | ||
|
||
int | ||
dblayer_erase_changelog_file(backend *be, struct attrinfo *a, PRBool use_lock, int no_force_chkpt) | ||
Check warning on line 388 in ldap/servers/slapd/back-ldbm/dblayer.c GitHub Actions / compile (GCC Strict)
Check warning on line 388 in ldap/servers/slapd/back-ldbm/dblayer.c GitHub Actions / compile (GCC Strict)
|
||
{ | ||
if ((NULL == be) || (NULL == be->be_database)) { | ||
return 0; | ||
|
@@ -494,8 +494,12 @@ | |
dblayer_close(struct ldbminfo *li, int dbmode) | ||
{ | ||
dblayer_private *priv = (dblayer_private *)li->li_dblayer_private; | ||
|
||
return priv->dblayer_close_fn(li, dbmode); | ||
int rc = priv->dblayer_close_fn(li, dbmode); | ||
if (rc == 0) { | ||
/* Clean thread specific data */ | ||
dblayer_destroy_txn_stack(); | ||
} | ||
return rc; | ||
} | ||
|
||
/* Routines for opening and closing random files in the dbi_env_t. | ||
|
@@ -667,6 +671,9 @@ | |
return 0; | ||
} | ||
struct ldbminfo *li = (struct ldbminfo *)be->be_database->plg_private; | ||
if (NULL == li) { | ||
return 0; | ||
} | ||
dblayer_private *priv = (dblayer_private *)li->li_dblayer_private; | ||
|
||
return priv->dblayer_rm_db_file_fn(be, a, use_lock, no_force_chkpt); | ||
|
@@ -1414,6 +1421,14 @@ | |
return; | ||
} | ||
|
||
void | ||
dblayer_destroy_txn_stack(void) | ||
{ | ||
/* Cleanup for the main thread to avoid false/positive leaks from libasan */ | ||
void *txn_stack = PR_GetThreadPrivate(thread_private_txn_stack); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unused variable, but why "get" it if you just "set" it to NULL on the next line? |
||
PR_SetThreadPrivate(thread_private_txn_stack, NULL); | ||
} | ||
|
||
const char * | ||
dblayer_get_db_suffix(Slapi_Backend *be) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shoul use C11 bool