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

Memory leak when using WantExpandedSQL #733

Closed
gwenn opened this issue Jul 28, 2019 · 1 comment · Fixed by #738
Closed

Memory leak when using WantExpandedSQL #733

gwenn opened this issue Jul 28, 2019 · 1 comment · Fixed by #738
Assignees

Comments

@gwenn
Copy link

gwenn commented Jul 28, 2019

expSQLiteCStr := C.sqlite3_expanded_sql((*C.sqlite3_stmt)(pStmt))

http://sqlite.org/c3ref/expanded_sql.html

The string returned by sqlite3_expanded_sql(P), on the other hand, is obtained from sqlite3_malloc() and must be free by the application by passing it to sqlite3_free().

@gjrtimmer
Copy link
Collaborator

@gwenn Thanks for pointing out, fix available in branch fix-733 could you please test and verify.

Thanks in advance.

gjrtimmer added a commit that referenced this issue Aug 22, 2019
gjrtimmer added a commit that referenced this issue Aug 22, 2019
gjrtimmer added a commit that referenced this issue Aug 22, 2019
gjrtimmer added a commit that referenced this issue Aug 22, 2019
gjrtimmer added a commit that referenced this issue Aug 22, 2019
collinvandyck pushed a commit to segmentio/go-sqlite3 that referenced this issue Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants