So I commented the two SQLFreeStmt() out, uncommented free_results(), and this is what I got...
https://gist.github.com/wecing/b3b72954b96dcf8c0989