Skip to content

Commit

Permalink
Fix JNI code to use openconnect_free_cert_info()
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Oct 27, 2014
1 parent 9f6f0df commit 6459552
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jni.c
Expand Up @@ -731,7 +731,7 @@ JNIEXPORT jstring JNICALL Java_org_infradead_libopenconnect_LibOpenConnect_getCe
if (!jresult)
OOM(ctx->jenv);

free(buf);
openconnect_free_cert_info(ctx->vpninfo, buf);
return jresult;
}

Expand All @@ -754,7 +754,7 @@ JNIEXPORT jbyteArray JNICALL Java_org_infradead_libopenconnect_LibOpenConnect_ge
if (jresult)
(*ctx->jenv)->SetByteArrayRegion(ctx->jenv, jresult, 0, ret, (jbyte *) buf);

free(buf);
openconnect_free_cert_info(ctx->vpninfo, buf);
return jresult;
}

Expand Down

0 comments on commit 6459552

Please sign in to comment.