Fossil SCM
Replaced a call to realloc() with cson_realloc() (which, in turn, uses the fossil realloc).
Commit
a1d2cd84b8a66dba4277a461c15d0b80f1025e5f
Parent
fab09a17105957a…
1 file changed
+1
-1
+1
-1
| --- src/cson_amalgamation.c | ||
| +++ src/cson_amalgamation.c | ||
| @@ -4349,11 +4349,11 @@ | ||
| 4349 | 4349 | { |
| 4350 | 4350 | return 0; |
| 4351 | 4351 | } |
| 4352 | 4352 | else |
| 4353 | 4353 | { |
| 4354 | - unsigned char * x = (unsigned char *)realloc( buf->mem, n ); | |
| 4354 | + unsigned char * x = (unsigned char *)cson_realloc( buf->mem, n, "cson_buffer::mem" ); | |
| 4355 | 4355 | if( ! x ) return cson_rc.AllocError; |
| 4356 | 4356 | memset( x + buf->used, 0, n - buf->used ); |
| 4357 | 4357 | buf->mem = x; |
| 4358 | 4358 | buf->capacity = n; |
| 4359 | 4359 | ++buf->timesExpanded; |
| 4360 | 4360 |
| --- src/cson_amalgamation.c | |
| +++ src/cson_amalgamation.c | |
| @@ -4349,11 +4349,11 @@ | |
| 4349 | { |
| 4350 | return 0; |
| 4351 | } |
| 4352 | else |
| 4353 | { |
| 4354 | unsigned char * x = (unsigned char *)realloc( buf->mem, n ); |
| 4355 | if( ! x ) return cson_rc.AllocError; |
| 4356 | memset( x + buf->used, 0, n - buf->used ); |
| 4357 | buf->mem = x; |
| 4358 | buf->capacity = n; |
| 4359 | ++buf->timesExpanded; |
| 4360 |
| --- src/cson_amalgamation.c | |
| +++ src/cson_amalgamation.c | |
| @@ -4349,11 +4349,11 @@ | |
| 4349 | { |
| 4350 | return 0; |
| 4351 | } |
| 4352 | else |
| 4353 | { |
| 4354 | unsigned char * x = (unsigned char *)cson_realloc( buf->mem, n, "cson_buffer::mem" ); |
| 4355 | if( ! x ) return cson_rc.AllocError; |
| 4356 | memset( x + buf->used, 0, n - buf->used ); |
| 4357 | buf->mem = x; |
| 4358 | buf->capacity = n; |
| 4359 | ++buf->timesExpanded; |
| 4360 |