MySQL 5.6 C API Developer Guide
my_bool mysql_stmt_free_result(MYSQL_STMT *stmt)
Releases memory associated with the result set produced by
execution of the prepared statement. If there is a cursor open
for the statement,
mysql_stmt_free_result()
closes it.