From 7e35f7f318168f1b735abc87754108c06955f50d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 14 Mar 2007 17:34:57 -0400 Subject: [PATCH] firewire: Free pending transactions on cdev release. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Kristian Høgsberg Signed-off-by: Stefan Richter --- drivers/firewire/fw-device-cdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c index ebf0d10..b1b7edb 100644 --- a/drivers/firewire/fw-device-cdev.c +++ b/drivers/firewire/fw-device-cdev.c @@ -827,8 +827,10 @@ static int fw_device_op_release(struct inode *inode, struct file *file) kfree(r); } - list_for_each_entry_safe(t, next_t, &client->transaction_list, link) + list_for_each_entry_safe(t, next_t, &client->transaction_list, link) { fw_cancel_transaction(client->device->card, &t->transaction); + kfree(t); + } /* FIXME: We should wait for the async tasklets to stop * running before freeing the memory. */ -- 2.7.4