mirror of
https://github.com/MariaDB/server.git
synced 2026-04-22 08:15:31 +02:00
Fix memory leak when one +O debug on top of another.
This commit is contained in:
parent
9f9ecc0626
commit
a03d846576
1 changed files with 4 additions and 0 deletions
|
|
@ -1863,6 +1863,8 @@ static void DBUGOpenFile(CODE_STATE *cs,
|
|||
name=cs->stack->name;
|
||||
if (strcmp(name, "-") == 0)
|
||||
{
|
||||
if (!is_shared(cs->stack, out_file))
|
||||
DBUGCloseFile(cs, cs->stack->out_file);
|
||||
cs->stack->out_file= stdout;
|
||||
cs->stack->flags |= FLUSH_ON_WRITE;
|
||||
cs->stack->name[0]=0;
|
||||
|
|
@ -1885,6 +1887,8 @@ static void DBUGOpenFile(CODE_STATE *cs,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!is_shared(cs->stack, out_file))
|
||||
DBUGCloseFile(cs, cs->stack->out_file);
|
||||
cs->stack->out_file= fp;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue