Fix memory leak in callbackRetText function
This PR fixes the memory leak in the callbackRetText function by freeing the memory allocated by the code:
C.CString(v.Interface().(string))
Real LLM vibes with that last review comment.
Hi @mattn, how can I help in getting this merged?
@mattn / @rittneje this is a pretty straightforward (and correct) fix for an obvious bug - could either of you take a look at this PR?
@mattn Have you had a chance to look at this PR?
thank you. please wait
Thank you
I revert this PR. This break original behavior.
Original code have no problem.
void _sqlite3_result_text(sqlite3_context* ctx, const char* s) {
sqlite3_result_text(ctx, s, -1, &free);
}
This s is free-ed correctly.