0
我正在一块的C代码splint
,它给了我下面的语句:夹板有趣的错误信息
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)
据我所知,夹板要我free
内存与calloc
但因为这分配前在应用程序的初始化中,我应该担心它吗?
编辑:这是怎样的VM->跳转表被初始化
vm->jumptable = (struct jumptable_entry**) calloc(vm->jumptable_size + 1,
sizeof(struct jumptable_entry*));
这里我们需要看到更多的代码,以真正了解发生了什么事情。 – Avery
需要显示VM-> jumptable'是如何'初始化。 – chux