Bug #108277 Potential resource leak
Submitted: 25 Aug 2022 1:32 Modified: 25 Aug 2022 11:56
Reporter: H Z Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[25 Aug 2022 1:32] H Z
Description:
There are potential resource leaks in source file "mysql-server/router/src/json_schema_embedder/json_schema_embedder.cc" (from mysql-server github repo)

The file pointers "in_file" and "out_file" are probably not closed when certain exception is thrown.

E.g. "in_file" is not closed when "out_file" opens failed (in this case a "Failed to open output file" exception is thrown). There are similar problems for other exceptions.

How to repeat:
The bug happens when certain exception is thrown.

Suggested fix:
Close the file when there are exceptions.
[25 Aug 2022 11:56] MySQL Verification Team
Hello Mr. Z,

Thank you for your bug report.

We are supporting only published releases, not the current state of our repository. The reason is quite simple. There will be many changes until the release is published, so it is quite probable that our developers know about that problem.

However, we will inform them about your findings ...... Thank you, very much .......

Unsupported.