[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1466497 - in /subversion/trunk/subversion/bindings/swig: core.i python/libsvn_swig_py/swigutil_py.c python/libsvn_swig_py/swigutil_py.h

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Wed, 10 Apr 2013 11:19:12 -0400

On 04/10/2013 11:12 AM, Philip Martin wrote:
> cmpilato_at_apache.org 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 <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Received on 2013-04-10 17:19:48 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.