From: Joern Engel Date: Wed, 13 Jul 2005 15:45:43 +0000 (+0100) Subject: [MTD] cfi_cmdset_0002: Plugged a mem leak. X-Git-Tag: v2.6.13-rc4~117^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6a8b4d319c52f8a3fdca46b185d001fbf0939911;p=linux-2.6-omap-h63xx.git [MTD] cfi_cmdset_0002: Plugged a mem leak. Signed-off-by: Joern Engel Signed-off-by: Thomas Gleixner --- diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index 8c24e18db3b..c894f880157 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c @@ -4,7 +4,7 @@ * * (C) 2000 Red Hat. GPL'd * - * $Id: cfi_cmdset_0020.c,v 1.17 2004/11/20 12:49:04 dwmw2 Exp $ + * $Id: cfi_cmdset_0020.c,v 1.19 2005/07/13 15:52:45 dwmw2 Exp $ * * 10/10/2000 Nicolas Pitre * - completely revamped method functions so they are aware and @@ -16,6 +16,8 @@ * - modified Intel Command Set 0x0001 to support ST Advanced Architecture * (command set 0x0020) * - added a writev function + * 07/13/2005 Joern Engel + * - Plugged memory leak in cfi_staa_writev(). */ #include @@ -719,6 +721,7 @@ cfi_staa_writev(struct mtd_info *mtd, const struct kvec *vecs, write_error: if (retlen) *retlen = totlen; + kfree(buffer); return ret; }