Fix memory leaks

This commit is contained in:
tbeu
2018-09-03 22:22:49 +02:00
parent 0421dabc1e
commit c056026dad
4 changed files with 10 additions and 8 deletions

View File

@@ -44,6 +44,7 @@ bool msgpack_vrefbuffer_init(msgpack_vrefbuffer* vbuf,
vbuf->array = array;
if((sizeof(msgpack_vrefbuffer_chunk) + chunk_size) < chunk_size){
free(array);
return false;
}
@@ -171,7 +172,7 @@ int msgpack_vrefbuffer_append_copy(msgpack_vrefbuffer* vbuf,
int msgpack_vrefbuffer_migrate(msgpack_vrefbuffer* vbuf, msgpack_vrefbuffer* to)
{
size_t sz = vbuf->chunk_size;
msgpack_vrefbuffer_chunk* empty = NULL;
msgpack_vrefbuffer_chunk* empty;
if((sizeof(msgpack_vrefbuffer_chunk) + sz) < sz){
return -1;