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