summaryrefslogtreecommitdiff
path: root/dbug/dbug.c
diff options
context:
space:
mode:
authorunknown <knielsen@mysql.com>2006-05-17 15:01:48 +0200
committerunknown <knielsen@mysql.com>2006-05-17 15:01:48 +0200
commit316f967d003ee9968ae1d58a81e7c268c109f50e (patch)
tree77fc1dd0a669d2d846d7594534d0fc24ef864527 /dbug/dbug.c
parent771d3d822955e28c58b4384524938ba9162ec5ab (diff)
downloadmariadb-git-316f967d003ee9968ae1d58a81e7c268c109f50e.tar.gz
After-merge fixes.
Diffstat (limited to 'dbug/dbug.c')
-rw-r--r--dbug/dbug.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c
index 0c019b5def8..07f72a3e758 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -256,7 +256,7 @@ static void DBUGCloseFile(CODE_STATE *cs, FILE *fp);
/* Push current debug settings */
static void PushState(CODE_STATE *cs);
/* Free memory associated with debug state. */
-static void FreeState (struct state *state);
+static void FreeState (CODE_STATE *cs, struct settings *state);
/* Test for tracing enabled */
static BOOLEAN DoTrace(CODE_STATE *cs);
@@ -744,7 +744,7 @@ void _db_pop_()
if (discard->next != NULL)
{
cs->stack= discard->next;
- FreeState(discard);
+ FreeState(cs, discard);
}
}
@@ -1432,7 +1432,8 @@ static void PushState(CODE_STATE *cs)
*
*/
static void FreeState (
-struct state *state)
+CODE_STATE *cs,
+struct settings *state)
{
if (!is_shared(state, keywords))
FreeList(state->keywords);
@@ -1469,12 +1470,17 @@ struct state *state)
*/
void _db_end_ ()
{
- reg1 struct state *discard;
- while((discard= stack) != NULL) {
- stack= discard -> next_state;
- FreeState (discard);
+ struct settings *discard;
+ CODE_STATE *cs=0;
+
+ get_code_state_or_return;
+
+ while((discard= cs->stack) != NULL) {
+ if(discard == &init_settings)
+ break;
+ cs->stack= discard->next;
+ FreeState (cs, discard);
}
- _db_on_=0;
}