summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-12-12 14:41:51 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-12-12 14:41:51 +0200
commit0a20e5ab77f8a6532b41ea2518626397059ccf42 (patch)
tree1ef90ec718bc16d80ca65eb89537f697e1482f09 /dbug
parente0f9540bcc6ab1618b6fd475f02e019401c4c295 (diff)
parentbeec9c0e19284a0e50d3629f4cb2486007b0333b (diff)
downloadmariadb-git-0a20e5ab77f8a6532b41ea2518626397059ccf42.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'dbug')
-rw-r--r--dbug/dbug.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c
index 46510fff224..847a8cc2b5d 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -515,9 +515,9 @@ static int DbugParse(CODE_STATE *cs, const char *control)
{
/* never share with the global parent - it can change under your feet */
stack->functions= ListCopy(init_settings.functions);
- LockIfInitSettings(cs);
+ LockMutex(cs);
stack->keywords= ListCopy(init_settings.keywords);
- UnlockIfInitSettings(cs);
+ UnlockMutex(cs);
stack->processes= ListCopy(init_settings.processes);
}
else
@@ -1621,7 +1621,10 @@ static void FreeState(CODE_STATE *cs, int free_state)
struct settings *state= cs->stack;
LockIfInitSettings(cs);
if (!is_shared(state, keywords))
+ {
FreeList(state->keywords);
+ state->keywords= NULL;
+ }
UnlockIfInitSettings(cs);
if (!is_shared(state, functions))
FreeList(state->functions);