From mboxrd@z Thu Jan 1 00:00:00 1970 From: valdis.kletnieks@vt.edu (valdis.kletnieks at vt.edu) Date: Wed, 26 Sep 2018 13:52:29 -0400 Subject: staging:rtl8192u: Possible memory leak? In-Reply-To: <20180926155201.GA25719@xux707-tw> References: <20180926155201.GA25719@xux707-tw> Message-ID: <13481.1537984349@turing-police.cc.vt.edu> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, 26 Sep 2018 16:52:03 +0100, John Whitmore said: > This might all be a mute point as I seem to remember someone saying > that memory allocation never fails in Linux and this can only happen > if the first two allocations work and the third fails. If memory allocation never fails, it would be a moot point, not a mute point. However, memory allocation can indeed fail, and often does. And you are correct, there is a memory leak. While looking at that, I found another minor issue. Patch submitted.