[CRIU] [PATCH 02/10] arm: Fix memory alloc/frees for core entry
Pavel Emelyanov
xemul at parallels.com
Thu Jul 4 04:23:19 EDT 2013
On 07/04/2013 01:04 PM, Cyrill Gorcunov wrote:
>
> - return -1 on error
> - assign allocated entries immediately
> - test for fpstate allocated on free path
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> CC: Alexander Kartashov <alekskartashov at parallels.com>
> ---
> arch/arm/crtools.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> void arch_free_thread_info(CoreEntry *core)
> {
> if (CORE_THREAD_ARCH_INFO(core)) {
> if (CORE_THREAD_ARCH_INFO(core)->fpstate) {
> - xfree(CORE_THREAD_ARCH_INFO(core)->fpstate->vfp_regs);
> + if (CORE_THREAD_ARCH_INFO(core)->fpstate)
Isn't one check enough?
> + xfree(CORE_THREAD_ARCH_INFO(core)->fpstate->vfp_regs);
> xfree(CORE_THREAD_ARCH_INFO(core)->fpstate);
> }
> xfree(CORE_THREAD_ARCH_INFO(core)->gpregs);
More information about the CRIU
mailing list