smack: fix possible use after frees in task_security() callers