[CRIU] [PATCH 2/5] rlimit: Allocate and free appropriate Core entry

Cyrill Gorcunov gorcunov at gmail.com
Thu Mar 13 00:33:53 PDT 2014


On Thu, Mar 13, 2014 at 11:22:29AM +0400, Andrew Vagin wrote:
> > +			task_rlimits = xmalloc(sizeof(*task_rlimits));
> > +			if (!task_rlimits)
> > +				goto err;
> > +			task_rlimits_entry__init(task_rlimits);
> > +			task_rlimits->n_rlimits = RLIM_NLIMITS;
> > +			task_rlimits->rlimits = xzalloc(pb_repeated_size(task_rlimits, rlimits));
> > +			if (!task_rlimits->rlimits)
> you forget to free task_rlimits, don't you?

Yeah, assignment should be done earlier so core_entry_free will handle it.
Thanks!


More information about the CRIU mailing list