diff options
author | stewart@mysql.com <> | 2005-05-06 10:43:29 +0200 |
---|---|---|
committer | stewart@mysql.com <> | 2005-05-06 10:43:29 +0200 |
commit | a17bf3f46510c205cb83520e693660a6b7090440 (patch) | |
tree | 85d631edbbe2dff5109f22471d3ca3374301e4e5 /ndb | |
parent | 15dbab1c12571fe59f7ae2f5c7e7689b6f07cc17 (diff) | |
download | mariadb-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.cpp | 5 |
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"); |