[Fix] Hook memleak.
This commit is contained in:
parent
eba65cf358
commit
34dccfb646
@ -94,14 +94,17 @@ void hook_rm(unsigned int id) {
|
||||
else break;
|
||||
}
|
||||
|
||||
/* Mark to delete, but do not delete yet, hooks are running. */
|
||||
if(hook_runningstack) {
|
||||
hook_stack[m].delete = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Free the hook. */
|
||||
hook_free(&hook_stack[m]);
|
||||
|
||||
/* Last hook, just clip the stack. */
|
||||
if(m == (hook_nstack-1)) {
|
||||
hook_free(&hook_stack[m]);
|
||||
hook_nstack--;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user