Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | tiny realloc function wrapper which handles cases of realloc failures | goriy | 2015-10-25 |
| | | | | | | | | | Memory reallocation with old data pointer handling is done by means of realloc_it() function. Tiny inline function realloc_it() is a wrapper function for standart realloc() which frees old memory pointer and prints errno to stderr if realloc fails. | ||
* | small fix of jsondump example for cases of realloc failures | goriy | 2015-10-24 |
| | | | | | | | | | | | When realloc() function fails it returns NULL pointer. But old data pointer remains valid in such a case. It's a mistake to use old data pointer to store new pointer returned by realloc. In case of realloc failure, pointer is overwritten with NULL value, but old used memory remains unreferenced and could not be even freed anymore. Such mistakes could lead to memory leaks. | ||
* | implemented key/value hierarchy; added 2 examples; fixed some warnings in tests | Serge A. Zaitsev | 2014-11-17 |