Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql_cacher: fix SQL result leak when insert_in_cachedb fails #3289

Conversation

benceszigeti
Copy link
Contributor

@benceszigeti benceszigeti commented Jan 23, 2024

Summary
After reviewing the sql_cacher reload, found an error case where we early return with -1, but the sql_res is not cleaned up as in other cases. This also impacts the reporting of the unsuccessful load/reload.

Details

N/A

Solution

Clean up the SQL result when insert_in_cachedb fails.

Compatibility

Found in 3.2, exists in master.

Closing issues

N/A

@benceszigeti benceszigeti force-pushed the hotfix/sql-cacher_load_entire_table_memory_leak branch from e8ece98 to d373ab6 Compare January 23, 2024 13:06
@bogdan-iancu bogdan-iancu merged commit 3bef4af into OpenSIPS:master Jan 23, 2024
44 checks passed
bogdan-iancu added a commit that referenced this pull request Jan 23, 2024
…tire_table_memory_leak

sql_cacher: fix SQL result leak when insert_in_cachedb fails

(cherry picked from commit 3bef4af)
bogdan-iancu added a commit that referenced this pull request Jan 23, 2024
…tire_table_memory_leak

sql_cacher: fix SQL result leak when insert_in_cachedb fails

(cherry picked from commit 3bef4af)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants