summaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorKristian Høgsberg2007-03-14 22:34:57 +0100
committerStefan Richter2007-03-15 18:21:36 +0100
commit7e35f7f318168f1b735abc87754108c06955f50d (patch)
tree2c8cb6a1981f1dd814339892a3fedb61dcc547e4 /drivers/firewire
parentfirewire: Zero out sd->scsi_host if we fail to register with the SCSI stack. (diff)
downloadkernel-qcow2-linux-7e35f7f318168f1b735abc87754108c06955f50d.tar.gz
kernel-qcow2-linux-7e35f7f318168f1b735abc87754108c06955f50d.tar.xz
kernel-qcow2-linux-7e35f7f318168f1b735abc87754108c06955f50d.zip
firewire: Free pending transactions on cdev release.
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-device-cdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firewire/fw-device-cdev.c b/drivers/firewire/fw-device-cdev.c
index ebf0d100805e..b1b7edb0d2ad 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. */