[CONC-119] Memory leak when reconnecting fails Created: 2015-01-12  Updated: 2015-01-12

Status: Open
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: 2.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Tianhong Assignee: Georg Richter
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Linux / Windows


Attachments: File test-leak.cpp    

 Description   

Hey Georg,

unfortunately the CONC-118 is not completely fixed in Rev. 192. There is still memory-leak if the reconnecting fails.

How to reproduce:

Step 1. Build the test code
Step 2. Start MySQL/Mariadb server
Step 3. Execute the test binary (in terminal or valgrind), and it would keep printing "Query OK"..
Step 4. Shut down MySQL/Mariadb server. And the client would keep printing "Query error..."
Step 5. Watch the memory usage of the test binary, and it would keep raising.

Solution:
Delete line 2025 in file libmariadb.c from rev.192. ( a bzero function )

And my last comment in CONC-118 explains why.

PS:
There is a patch from me when I reported the bug CONC118, which has already deleted the "bzero" line. Perhaps you have missed this point.

Best Regards
Tianhong


Generated at Thu Feb 08 03:03:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.