summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
Diffstat (limited to 'dbug')
-rw-r--r--dbug/dbug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c
index 608b4395c81..e653013e09a 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -1637,8 +1637,8 @@ static void PushState(CODE_STATE *cs)
struct settings *new_malloc;
new_malloc= (struct settings *) DbugMalloc(sizeof(struct settings));
+ bzero(new_malloc, sizeof(struct settings));
new_malloc->next= cs->stack;
- new_malloc->out_file= NULL;
cs->stack= new_malloc;
}
@@ -2121,7 +2121,7 @@ static FILE *OpenProfile(CODE_STATE *cs, const char *name)
static void DBUGCloseFile(CODE_STATE *cs, FILE *fp)
{
- if (fp != stderr && fp != stdout && fclose(fp) == EOF)
+ if (fp != NULL && fp != stderr && fp != stdout && fclose(fp) == EOF)
{
if (!cs->locked)
pthread_mutex_lock(&THR_LOCK_dbug);