diff options
Diffstat (limited to 'dbug/dbug.c')
-rw-r--r-- | dbug/dbug.c | 7 |
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); |