diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-07-16 20:15:36 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-07-18 17:53:28 -0400 |
commit | 9c9bdf4d50730fd04b06077e22d7a83b585f26b5 (patch) | |
tree | a7d78a732aa2502a4e43d5a5c56966b17b51a4c8 /drivers/firewire/fw-transaction.c | |
parent | 5d59a6f1ba90f15132d55d9d4d5a632f15a43d84 (diff) |
firewire: fix memory leak of fw_request instances
Found and debugged by Jay Fenlason <fenlason@redhat.com>.
The bug was especially noticeable with direct I/O over fw-sbp2.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Diffstat (limited to 'drivers/firewire/fw-transaction.c')
-rw-r--r-- | drivers/firewire/fw-transaction.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index c4b3417a5dac..3ce8e2fbe15f 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c | |||
@@ -605,8 +605,10 @@ fw_send_response(struct fw_card *card, struct fw_request *request, int rcode) | |||
605 | * check is sufficient to ensure we don't send response to | 605 | * check is sufficient to ensure we don't send response to |
606 | * broadcast packets or posted writes. | 606 | * broadcast packets or posted writes. |
607 | */ | 607 | */ |
608 | if (request->ack != ACK_PENDING) | 608 | if (request->ack != ACK_PENDING) { |
609 | kfree(request); | ||
609 | return; | 610 | return; |
611 | } | ||
610 | 612 | ||
611 | if (rcode == RCODE_COMPLETE) | 613 | if (rcode == RCODE_COMPLETE) |
612 | fw_fill_response(&request->response, request->request_header, | 614 | fw_fill_response(&request->response, request->request_header, |