Cursor is freed properly.