On 11/23/2010 04:40 PM, Ivana Hutarova Varekova wrote: > free the used memory correctly > > Signed-off-by: Ivana Hutarova Varekova<[email protected]> > --- > > src/tools/cgsnapshot.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/src/tools/cgsnapshot.c b/src/tools/cgsnapshot.c > index b5710a3..1e3c927 100644 > --- a/src/tools/cgsnapshot.c > +++ b/src/tools/cgsnapshot.c > @@ -470,6 +470,7 @@ static int display_controller_data( > display_cgroup_data(group, controller, info.full_path, > prefix_len, first, program_name); > first = 0; > + cgroup_free(&group); > } > }
This time, the last group is being freed twice (which is basically OK, cgroup_free counts with that). But if the cgroup_get_cgroup() fails, the group is not being freed at all. > > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > Tap into the largest installed PC base& get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Libcg-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/libcg-devel > ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
