If I use calloc to allocate a structure with a pointer in it and then allocate the pointer I get the following warning:
Implicitly only storage b->x (type char *) not released before assignment:
b->x = calloc(1, sizeof(char))
transferChecks.c:2699: Source code error generation point.
A memory leak has been detected. Only-qualified storage is not released
before the last reference to it is lost. (Use -mustfreeonly to inhibit
warning)
If I use malloc instead I do not get this warning. I have attached example code which displays the problem.
Example File to produce problem