summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2023-02-08 05:16:29 +0100
committerAndrew Hutchings <andrew@linuxjedi.co.uk>2023-02-17 13:43:43 +0000
commitf0ea22a1e22c84affa91ec0e596fbd387d11ff8a (patch)
tree05fe71c379090e8e1b9de423ec38a67879c37975
parent487889119386cdab9923c570e0eb23b6c7e002ea (diff)
downloadmariadb-git-f0ea22a1e22c84affa91ec0e596fbd387d11ff8a.tar.gz
MDBF-534: Coverity scan: fix client folder
--------------------------------- File: `mysqlbinlog` --------------------------------- - Coverity (FORWARD_NULL): https://scan5.scan.coverity.com/reports.htm#v58936/p10357/fileInstanceId=231728438&defectInstanceId=53074517&mergedDefectId=1519690&eventId=53074517-46 `mysqlbinlog` - for `opt_raw_mode` file is set to 0, make sure it opened before.
-rw-r--r--client/mysqlbinlog.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index aa994df7557..28108922538 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -3169,7 +3169,7 @@ int main(int argc, char** argv)
/* Set delimiter back to semicolon */
if (retval != ERROR_STOP)
{
- if (!stop_event_string.is_empty())
+ if (!stop_event_string.is_empty() && result_file)
fprintf(result_file, "%s", stop_event_string.ptr());
if (!opt_raw_mode && opt_flashback)
fprintf(result_file, "DELIMITER ;\n");