Messages in this thread | | | Date | Mon, 24 Aug 2009 18:37:21 +0200 | From | Eric Dumazet <> | Subject | Re: [PATCH] cciss: memory leak in cciss_init_one() |
| |
Miller, Mike (OS Dev) a écrit : > > >> -----Original Message----- >> From: Jens Axboe [mailto:jens.axboe@oracle.com] >> Sent: Monday, August 24, 2009 3:01 AM >> To: Eric Dumazet >> Cc: Andrew Morton; Miller, Mike (OS Dev); linux kernel; >> stable@kernel.org; FUJITA Tomonori >> Subject: Re: [PATCH] cciss: memory leak in cciss_init_one() >> >> On Sun, Aug 23 2009, Eric Dumazet wrote: >>> Andrew, I originally sent this 18 days ago and got no reply >> yet, maybe >>> could you get the baby ? >> I'll add it for 2.6.32. >> > > I guess I'm missing something. Where is the leak?
Well...
Problem is : In normal path, kfree(inq_buff); is not called.
It is called only if a "goto clean4;" is done (error path, and in this case, inq_buff is NULL anyway)
So we exit from cciss_init_one() without freeing a "InquiryData_struct" structure.
I am pretty sure kmemleak would complain on this leak :) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |