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

Re: svn commit: r949842 - /subversion/trunk/subversion/bindings/javahl/native/CopySources.cpp

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 3 Jun 2010 17:35:45 -0400

Log msg has the wrong func names...

On Mon, May 31, 2010 at 15:36, <hwright_at_apache.org> wrote:
> Author: hwright
> Date: Mon May 31 19:36:53 2010
> New Revision: 949842
>
> URL: http://svn.apache.org/viewvc?rev=949842&view=rev
> Log:
> Fix a double free in the JavaHL bindings.
>
> Patch by: Byeongcheol Lee <lineonking_at_gmail.com>
>
> * subversion/bindings/javahl/native/CopySources.cpp
>  (array): Replace JNIStringHolder() with two calls to GetStringUTFChars()
>    and DeleteLocalRef().
>
> Modified:
>    subversion/trunk/subversion/bindings/javahl/native/CopySources.cpp
>
> Modified: subversion/trunk/subversion/bindings/javahl/native/CopySources.cpp
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/CopySources.cpp?rev=949842&r1=949841&r2=949842&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/bindings/javahl/native/CopySources.cpp (original)
> +++ subversion/trunk/subversion/bindings/javahl/native/CopySources.cpp Mon May 31 19:36:53 2010
> @@ -116,11 +116,12 @@ CopySources::array(SVN::Pool &pool)
>       if (JNIUtil::isJavaExceptionThrown())
>         return NULL;
>
> -      JNIStringHolder path(jpath);
> +      const char *path = env->GetStringUTFChars(jpath, NULL);
>       if (JNIUtil::isJavaExceptionThrown())
>         return NULL;
>
> -      src->path = apr_pstrdup(p, (const char *) path);
> +      src->path = apr_pstrdup(p, path);
> +      env->ReleaseStringUTFChars(jpath, path);
>       SVN_JNI_ERR(JNIUtil::preprocessPath(src->path, pool.pool()),
>                   NULL);
>       env->DeleteLocalRef(jpath);
>
>
>
Received on 2010-06-03 23:36:23 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.