[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151001150450.GE7289@mwanda>
Date: Thu, 1 Oct 2015 18:04:50 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Ronit Halder <ronit.crj@...il.com>
Cc: Lidza Louina <lidza.louina@...il.com>, devel@...verdev.osuosl.org,
Greg KH <gregkh@...uxfoundation.org>,
DaeSeok Youn <daeseok.youn@...il.com>,
driverdev-devel@...uxdriverproject.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: dgap: fix memory leak in dgap_parsefile()
On Thu, Oct 01, 2015 at 09:11:31AM +0530, Ronit Halder wrote:
> The existing dgap_parsefile() rejects invalid config file.
> But before we know that config file is invalid a lot of memory leak
> can happen. Removing the chances of memory leak won't heart anyone.
>
Why not just reject it earlier instead of allocating more data?
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists