s3/py_passdb: maintain correct refcount on allocation failure