diff options
author | Michael Widenius <monty@askmonty.org> | 2010-11-23 23:39:59 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-11-23 23:39:59 +0200 |
commit | b52020221e8b4e58d1bc6dd5a5a6f065a6a3a083 (patch) | |
tree | 6068b9d90b4127b1c3608e29913fa82bf1a1f20e /dbug | |
parent | 7840965db9460e2117c163f3db83aaa247c65203 (diff) | |
parent | 498ee6bd19eabc85dcbd9abebc9cf6aeb79d1985 (diff) | |
download | mariadb-git-b52020221e8b4e58d1bc6dd5a5a6f065a6a3a083.tar.gz |
Merge with MySQL 5.1.52
Diffstat (limited to 'dbug')
-rw-r--r-- | dbug/dbug.c | 4 |
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); |