diff --git a/fs/exec.c b/fs/exec.c index f1691cd0c9d2..1ba85c7fc6af 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -100,6 +100,7 @@ int unregister_binfmt(struct linux_binfmt * fmt) while (*tmp) { if (fmt == *tmp) { *tmp = fmt->next; + fmt->next = NULL; write_unlock(&binfmt_lock); return 0; }