[CRIU] [PATCH 02/10] arm: Fix memory alloc/frees for core entry, v2

Cyrill Gorcunov gorcunov at gmail.com
Thu Jul 4 04:27:46 EDT 2013


On Thu, Jul 04, 2013 at 03:23:19PM +0400, Pavel Emelyanov wrote:
> 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?

Oh, sorry, overlooked that we've one already. Updated


More information about the CRIU mailing list