Fix a Cursor leak

When cursor is done, the cursor must be closed to avoid cursor leak.

Change-Id: I627cf2c8a64a220d6fd104505b852daca0928190