From adf06b94cf5b7dcc146b4585a63e5f435016d4dd Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Fri, 14 Mar 2014 15:33:02 +0400 Subject: [PATCH] core: Don't free not-allocated thread_info Signed-off-by: Pavel Emelyanov --- arch/x86/crtools.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/crtools.c b/arch/x86/crtools.c index b3300acb6..818195dac 100644 --- a/arch/x86/crtools.c +++ b/arch/x86/crtools.c @@ -288,6 +288,9 @@ err: void arch_free_thread_info(CoreEntry *core) { + if (!core->thread_info) + return; + if (core->thread_info->fpregs->xsave) xfree(core->thread_info->fpregs->xsave->ymmh_space); xfree(core->thread_info->fpregs->st_space);