I am running splint
on a piece of C code and it gave me the following statement:
jmptable.c:34:5: Implicitly only storage vm->jumptable (type struct
jumptable_entry **) not released before assignment:
vm->jumptable = (struct jumptable_entry **)calloc(vm->jumptable_size + 1,
sizeof(struct jumptable_entry *))
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)
I understand that splint wants me to free
the memory before allocating it with calloc
but since this is in the very initialization of the application should I worry about it?
Edit: This is how the vm->jumptable is initialized
vm->jumptable = (struct jumptable_entry**) calloc(vm->jumptable_size + 1,
sizeof(struct jumptable_entry*));