if(data == NULL) MEM_FREE(data); \
data = MEM_ALLOC(size);
Whats the point of calling MEM_FREE on NULL?
The code looks to me as if the intention was to do
if(data != NULL) MEM_FREE(data); \
i.e. to free the data if there was any...
the way it is when called with a data not null you will end up with a memory leak.
DscVeraCrypt.c
define VCCONFIG_ALLOC(data, size) \
if(data == NULL) MEM_FREE(data); \ data = MEM_ALLOC(size);
Whats the point of calling MEM_FREE on NULL? The code looks to me as if the intention was to do if(data != NULL) MEM_FREE(data); \ i.e. to free the data if there was any...
the way it is when called with a data not null you will end up with a memory leak.