On Tue, Mar 31, 2009 at 11:05:26AM +0900, Ken'ichi Ohmichi wrote: > > Hi, > > Ken'ichi Ohmichi wrote: > > I reviewed the libcgroup code in the viewpoint of memory-leak and > > found a lack of free(). This patch adds a free() call for error > > handling. > > > > > > Thanks > > Ken'ichi Ohmichi > > > > Signed-off-by: Ken'ichi Ohmichi <[email protected]> > > --- > > --- a/api.c 2009-03-30 12:14:42.000000000 +0900 > > +++ b/api.c 2009-03-30 12:15:13.000000000 +0900 > > @@ -589,8 +589,8 @@ int cgroup_init() > > ret = ECGOTHER; > > goto unlock_exit; > > } > > - buf = fgets(buf, FILENAME_MAX, proc_cgroup); > > - if (!buf) { > > + if (!fgets(buf, FILENAME_MAX, proc_cgroup)) { > > + free(buf); > > ret = EIO; > > goto unlock_exit; > > } > > The above patch was based on old libcgroup code, and I created a new > patch based on the latest libcgroup which is taken from git tree. >
Thanks Ken'ichi! I've applied this patch. -- regards, Dhaval ------------------------------------------------------------------------------ _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
