Re: [PATCH 30/32] x86/intel_rdt_rdtgroup.c: Process schemas input from rscctrl interface

From: Thomas Gleixner
Date: Thu Jul 14 2016 - 02:14:02 EST


On Wed, 13 Jul 2016, David Carrillo-Cisneros wrote:
> > +static void free_cache_resource(struct cache_resource *l)
> > +{
> > + kfree(l->cbm);
> > + kfree(l->cbm2);
> > + kfree(l->closid);
> > + kfree(l->refcnt);
>
> this function is used to clean up alloc_cache_resource in the error
> path of get_resources where it's not necessarily true that all of l's
> members were allocated.

kfree handles kfree(NULL) nicely.....

Thanks,

tglx