On 04/10/2013 11:12 AM, Philip Martin wrote: > [email protected] writes: > >> Author: cmpilato >> Date: Wed Apr 10 14:38:17 2013 >> New Revision: 1466497 > >> +svn_swig_py_config_auth_walk_func(svn_boolean_t *delete_cred, >> + void *walk_baton, >> + const char *cred_kind, >> + const char *realmstring, >> + apr_hash_t *hash, >> + apr_pool_t *scratch_pool) >> { >> - PyObject *function = cleanup_baton; >> + PyObject *function = walk_baton; >> PyObject *result; >> - PyObject *py_scratch_pool; >> + PyObject *py_scratch_pool, *py_hash; >> svn_error_t *err = SVN_NO_ERROR; >> >> *delete_cred = FALSE; >> @@ -3310,11 +3310,16 @@ svn_swig_py_auth_cleanup_func(svn_boolea >> err = callback_exception_error(); >> goto finished; >> } >> + py_hash = svn_swig_py_prophash_to_dict(hash); >> + if (py_hash == NULL) >> + { >> + err = callback_exception_error(); >> + goto finished; >> + } > > This error path bypasses the Py_DECREF for py_hash. Does that matter? > I'm still trying to understand exactly when Py_DECREF and Py_INCREF are > required.
You and me both. Did you perhaps make a small mistake above? If py_hash == NULL, I don't think we care need to DECREF if. But perhaps you meant to point out that we'd be bypassing the DECREF of py_scratch_pool, instead? -- C. Michael Pilato <[email protected]> CollabNet <> www.collab.net <> Enterprise Cloud Development
signature.asc
Description: OpenPGP digital signature

