From 4d2131354914f54f85abf0bb8cb4bdd42d817f73 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 24 May 2017 13:11:33 +0200 Subject: coverity medium warnings --- client/mysql_upgrade.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client/mysql_upgrade.c') diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 397a252cdc0..e131aabd8b6 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -1083,6 +1083,8 @@ int main(int argc, char **argv) { int fd= create_temp_file(cnf_file_path, opt_tmpdir[0] ? opt_tmpdir : NULL, "mysql_upgrade-", O_CREAT | O_WRONLY, MYF(MY_FAE)); + if (fd < 0) + die(NULL); my_write(fd, USTRING_WITH_LEN( "[client]\n"), MYF(MY_FAE)); my_write(fd, (uchar*)ds_args.str, ds_args.length, MYF(MY_FAE)); my_close(fd, MYF(0)); -- cgit v1.2.1