In JNI routines which set an OutputPointer.value, always do so, even on error, for consistency.
FossilOrigin-Name: d0df62f0af19a69f7ceb3ad1dceda0d8cc2ca5016a6e2a3a1e36356424c3ca49
This commit is contained in:
parent
3aeb58c90c
commit
0c072b698b
@ -2443,12 +2443,11 @@ S3JniApi(sqlite3_blob_open(),jint,1blob_1open)(
|
||||
: SQLITE_NOMEM;
|
||||
if( 0==rc ){
|
||||
jobject rv = new_java_sqlite3_blob(env, pBlob);
|
||||
if( rv ){
|
||||
OutputPointer_set_obj(env, S3JniNph(OutputPointer_sqlite3_blob), jOut, rv);
|
||||
}else{
|
||||
if( !rv ){
|
||||
sqlite3_blob_close(pBlob);
|
||||
rc = SQLITE_NOMEM;
|
||||
}
|
||||
OutputPointer_set_obj(env, S3JniNph(OutputPointer_sqlite3_blob), jOut, rv);
|
||||
}
|
||||
sqlite3_free(zDbName);
|
||||
sqlite3_free(zTableName);
|
||||
@ -3895,13 +3894,12 @@ static int s3jni_preupdate_newold(JNIEnv * const env, int isNew, jobject jDb,
|
||||
rc = fOrig(pDb, (int)iCol, &pOut);
|
||||
if( 0==rc ){
|
||||
jobject pWrap = new_java_sqlite3_value(env, pOut);
|
||||
if( pWrap ){
|
||||
OutputPointer_set_obj(env, S3JniNph(OutputPointer_sqlite3_value),
|
||||
jOut, pWrap);
|
||||
S3JniUnrefLocal(pWrap);
|
||||
}else{
|
||||
if( !pWrap ){
|
||||
rc = SQLITE_NOMEM;
|
||||
}
|
||||
OutputPointer_set_obj(env, S3JniNph(OutputPointer_sqlite3_value),
|
||||
jOut, pWrap);
|
||||
S3JniUnrefLocal(pWrap);
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
|
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Remove\sseveral\sunnececessary\sfunctions.
|
||||
D 2023-09-04T05:58:13.370
|
||||
C In\sJNI\sroutines\swhich\sset\san\sOutputPointer.value,\salways\sdo\sso,\seven\son\serror,\sfor\sconsistency.
|
||||
D 2023-09-04T06:15:37.421
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -237,7 +237,7 @@ F ext/icu/sqliteicu.h fa373836ed5a1ee7478bdf8a1650689294e41d0c89c1daab26e9ae78a3
|
||||
F ext/jni/GNUmakefile 2ae5e34ad21da48a8c1dd6e9e421d6bbb78716e3a03ad29dd86d9bd530ee3fc0
|
||||
F ext/jni/README.md 1332b1fa27918bd5d9ca2d0d4f3ac3a6ab86b9e3699dc5bfe32904a027f3d2a9
|
||||
F ext/jni/jar-dist.make 030aaa4ae71dd86e4ec5e7c1e6cd86f9dfa47c4592c070d2e35157e42498e1fa
|
||||
F ext/jni/src/c/sqlite3-jni.c 93452c93e4e23884490f0c8ee76a38bc6c9a441800d95ff86aacb0991ab414d0
|
||||
F ext/jni/src/c/sqlite3-jni.c 1b406fc279306db41e32297c194038973bc4c6befafbb83be0bb255debe45ed0
|
||||
F ext/jni/src/c/sqlite3-jni.h 6a6dfa22fc760f3a355cdc42cae07ea06ae3ee6d4fbf60bb11220a250926064c
|
||||
F ext/jni/src/org/sqlite/jni/AbstractCollationCallback.java 95e88ba04f4aac51ffec65693e878e234088b2f21b387f4e4285c8b72b33e436
|
||||
F ext/jni/src/org/sqlite/jni/AggregateFunction.java 7312486bc65fecdb91753c0a4515799194e031f45edbe16a6373cea18f404dc4
|
||||
@ -2117,8 +2117,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 8e1ae3197a62796565b7260b230057bdb3f136edd00a83f8a63532d44d386243
|
||||
R 5de5f56813f9d2b943c3cc107d561381
|
||||
P 84433c72b0b08e7906ef87758caffe98f95df812945a7aea675bbc20791e33c0
|
||||
R 137bff2b9d70db03844846385ed7bc3f
|
||||
U stephan
|
||||
Z b5a6e033e7444f24fb64279fc427f971
|
||||
Z 9ac4c3726b9a591fa96f8b45cdf4fa42
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
84433c72b0b08e7906ef87758caffe98f95df812945a7aea675bbc20791e33c0
|
||||
d0df62f0af19a69f7ceb3ad1dceda0d8cc2ca5016a6e2a3a1e36356424c3ca49
|
Loading…
Reference in New Issue
Block a user