aboutsummaryrefslogtreecommitdiff
path: root/src/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/json.c b/src/json.c
index f7e1591ad..1e88b5174 100644
--- a/src/json.c
+++ b/src/json.c
@@ -1729,6 +1729,7 @@ static int jsonConvertTextToBlob(
if( zJson[i] ){
i += json5Whitespace(&zJson[i]);
if( zJson[i] ){
+ if( pCtx ) sqlite3_result_error(pCtx, "malformed JSON", -1);
jsonParseReset(pParse);
return 1;
}
@@ -2801,9 +2802,6 @@ rebuild_from_cache:
p->hasNonstd = pFromCache->hasNonstd;
jsonParseFree(pFromCache);
return p;
- }else{
- jsonParseFree(pFromCache);
- pFromCache = 0;
}
if( eType==SQLITE_BLOB ){
u32 n, sz = 0;