1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-09 22:24:09 +03:00

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.
This commit is contained in:
Anel Husakovic
2023-02-08 05:16:29 +01:00
committed by Andrew Hutchings
parent 4878891193
commit f0ea22a1e2

View File

@@ -3169,7 +3169,7 @@ int main(int argc, char** argv)
/* Set delimiter back to semicolon */ /* Set delimiter back to semicolon */
if (retval != ERROR_STOP) 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()); fprintf(result_file, "%s", stop_event_string.ptr());
if (!opt_raw_mode && opt_flashback) if (!opt_raw_mode && opt_flashback)
fprintf(result_file, "DELIMITER ;\n"); fprintf(result_file, "DELIMITER ;\n");