diff options
Diffstat (limited to 'client/mysql_plugin.c')
-rw-r--r-- | client/mysql_plugin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/client/mysql_plugin.c b/client/mysql_plugin.c index 81677ad551f..d297f3cd03e 100644 --- a/client/mysql_plugin.c +++ b/client/mysql_plugin.c @@ -365,6 +365,12 @@ static int get_default_values() } /* Now open the file and read the defaults we want. */ file= fopen(defaults_file, "r"); + if (file == NULL) + { + fprintf(stderr, "ERROR: failed to open file %s: %s.\n", defaults_file, + strerror(errno)); + goto exit; + } while (fgets(line, FN_REFLEN, file) != NULL) { char *value= 0; |