diff options
author | drh <> | 2021-05-28 12:15:19 +0000 |
---|---|---|
committer | drh <> | 2021-05-28 12:15:19 +0000 |
commit | d2f55773f1ef16132103f6b607802a59a00013b8 (patch) | |
tree | 5b69ff8aaabdb72b0214e8908a0761fed0e368f9 /ext/misc/json1.c | |
parent | 48a296c58954b93b1bde1006f77718450de81039 (diff) | |
download | sqlite-d2f55773f1ef16132103f6b607802a59a00013b8.tar.gz sqlite-d2f55773f1ef16132103f6b607802a59a00013b8.zip |
Fix a potential memory leak in json_group_object() following an error.
dbsqlfuzz cd32630de3ff039d97089592b63cb3616f8ec9dd
FossilOrigin-Name: 21676731cedae27d1ab9fe62b269001ae6e3eeb3caa87b4f5536f777631a8bbc
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r-- | ext/misc/json1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c index 41ff01db4..077d02d91 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -2003,8 +2003,8 @@ static void jsonObjectStep( jsonAppendChar(pStr, '{'); }else if( pStr->nUsed>1 ){ jsonAppendChar(pStr, ','); - pStr->pCtx = ctx; } + pStr->pCtx = ctx; z = (const char*)sqlite3_value_text(argv[0]); n = (u32)sqlite3_value_bytes(argv[0]); jsonAppendString(pStr, z, n); |