Re: potential mem leak when system is low on memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > func()
> > {
> >    for (i = 0; i < LENGTH; i++) {
> >            var1[i] = kmalloc(size);
> >            if (!var1[i])
> >                 return -ENOMEM;
> > 
> > /* mem leak as var1[0] to var1[i - 1] is not freed */
> > 
> >    }
> > }
> > 
> > So, already the system is running low on memory and on top of it there
> > are leaks.
> 
> So you've found elementary programming bugs and it would
> be nice to point this places.
> 

As of now, when I come across such a leak, I fix it. But if I am unable to do so, I will
definitely send out a mail.

Regards,
Amit Choudhary
 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux