On Fri, 13 Jul 2001, Evan Parker wrote:
> Enclosed are 10 bugs where code uses memory that has already been
> freed.
...
> 1 | /home/eparker/tmp/linux/2.4.6-ac2/drivers/net/irda/ali-ircc.c/
Here's the patch for review:
--- linux-2.4.7/drivers/net/irda/ali-ircc.c~ Thu Jul 12 14:20:56 2001
+++ linux-2.4.7/drivers/net/irda/ali-ircc.c Sat Jul 14 12:01:07 2001
@@ -331,8 +331,8 @@
self->tx_buff.head = (__u8 *) kmalloc(self->tx_buff.truesize,
GFP_KERNEL|GFP_DMA);
if (self->tx_buff.head == NULL) {
- kfree(self);
kfree(self->rx_buff.head);
+ kfree(self);
return -ENOMEM;
}
memset(self->tx_buff.head, 0, self->tx_buff.truesize);
BYtE
Philipp
-- / / (_)__ __ ____ __ Philipp Hahn / /__/ / _ \/ // /\ \/ / /____/_/_//_/\_,_/ /_/\_\ pmhahn@titan.lahn.de
- 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/