cursor.callproc: added a missing memory check