From: Wolfgang Denk Date: Tue, 18 Aug 2009 21:31:12 +0200 Subject: [U-Boot] [PATCH] jffs2: clean the cache in case of malloc fails in build_lists In-Reply-To: <1250080968-10923-1-git-send-email-yanok@emcraft.com> References: <1250080968-10923-1-git-send-email-yanok@emcraft.com> Message-ID: <20090818193112.D3950833DBD2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Ilya Yanok, In message <1250080968-10923-1-git-send-email-yanok@emcraft.com> you wrote: > We should call jffs2_clean_cache() if we return from jffs2_build_lists() > with an error to prevent usage of incomplete lists. Also we should > free() a local buffer to prevent memory leaks. > > Signed-off-by: Ilya Yanok > --- > fs/jffs2/jffs2_1pass.c | 17 ++++++++++++++--- > 1 files changed, 14 insertions(+), 3 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "The trouble with doing something right the first time is that nobody appreciates how difficult it was." - Walt West