fix memory leak in result_set destructor