summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorstewart@mysql.com <>2005-05-06 10:43:29 +0200
committerstewart@mysql.com <>2005-05-06 10:43:29 +0200
commita17bf3f46510c205cb83520e693660a6b7090440 (patch)
tree85d631edbbe2dff5109f22471d3ca3374301e4e5 /ndb
parent15dbab1c12571fe59f7ae2f5c7e7689b6f07cc17 (diff)
downloadmariadb-git-a17bf3f46510c205cb83520e693660a6b7090440.tar.gz
Bug#10193
Invalid DataDir in config causes ndbd segfault
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/kernel/error/ErrorReporter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ndb/src/kernel/error/ErrorReporter.cpp b/ndb/src/kernel/error/ErrorReporter.cpp
index 35cd3f099d9..7c77e7932ee 100644
--- a/ndb/src/kernel/error/ErrorReporter.cpp
+++ b/ndb/src/kernel/error/ErrorReporter.cpp
@@ -237,6 +237,11 @@ WriteMessage(ErrorCategory thrdType, int thrdMessageID,
// Create a new file, and skip the first 69 bytes,
// which are info about the current offset
stream = fopen(theErrorFileName, "w");
+ if(stream == NULL)
+ {
+ fprintf(stderr,"Unable to open error log file: %s\n", theErrorFileName);
+ return -1;
+ }
fprintf(stream, "%s%u%s", "Current byte-offset of file-pointer is: ", 69,
" \n\n\n");