1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Fix some minor memory issues so that all legacy tests now pass.

FossilOrigin-Name: 1744bfc669346ff221f28d45fd978863e876a2d2f0b82bcf0e5ee6f0326900cc
This commit is contained in:
drh
2023-09-28 19:11:36 +00:00
parent 0a19bb078d
commit 8cdab14286
3 changed files with 14 additions and 10 deletions

View File

@@ -543,10 +543,10 @@ static void jsonAppendNormalizedInt(JsonString *p, const char *zIn, u32 N){
assert( rc==2 );
jsonAppendRawNZ(p, "9.0e999", 7);
}
return;
}else{
assert( N>0 );
jsonAppendRawNZ(p, zIn, N);
}
assert( N>0 );
jsonAppendRawNZ(p, zIn, N);
sqlite3_free(zBuf);
}
@@ -972,6 +972,10 @@ static void jsonReturn(
assert( pNode->eU==1 );
zz = sqlite3DbStrNDup(db, pNode->u.zJContent, pNode->n);
if( zz==0 ){
sqlite3_result_error_nomem(pCtx);
return;
}
z = zz;
if( z[0]=='-' ){ z++; bNeg = 1; }
else if( z[0]=='+' ){ z++; }