fixed memory leak caused by PQprepare#40
Conversation
Documentations says: "As with PQexec, the result is normally a PGresult object whose contents indicate server-side success or failure." This PGresult objects needs to be cleared with PQclear. "Every command result should be freed via PQclear when it is no longer needed."
|
I think there is another memory leak when Edit: never mind solved it like in |
Codecov Report
@@ Coverage Diff @@
## master #40 +/- ##
==========================================
- Coverage 73.42% 73.37% -0.05%
==========================================
Files 3 3
Lines 444 447 +3
==========================================
+ Hits 326 328 +2
- Misses 118 119 +1
Continue to review full report at Codecov.
|
|
@tunniclm Should we have a look at this? |
|
@EnriqueL8 Missed this notification, sorry! Yes, I think this looks important and we should investigate and merge if it looks good. |
|
LGTM, @ianpartridge what do you think? |
|
LGTM, merge when you're ready. @EnriqueL8 can you also audit the rest of the codebase for missing calls to |
|
Could do |
|
I believe the three cases (Query, PreparedStatement and Transaction) are now covered:
|
|
Cool, thanks. I think this should be tagged as |
|
okay, merging |
Documentations says: "As with PQexec, the result is normally a PGresult object whose contents indicate server-side success or failure."
This PGresult objects needs to be cleared with PQclear. "Every command result should be freed via PQclear when it is no longer needed."