projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c010de
)
ACPI: EC: acpi_ec_remove(): fix use-after-free
author
Adrian Bunk
<
[email protected]
>
Sun, 29 Jul 2007 15:00:37 +0000
(17:00 +0200)
committer
Len Brown
<
[email protected]
>
Sat, 4 Aug 2007 02:28:11 +0000
(22:28 -0400)
This patch fixes an obvious use-after-free introduced by
commit
837012ede14a8fc088be3682c964da7fc6af026b
.
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <
[email protected]
>
Acked-by: Alexey Starikovskiy <
[email protected]
>
Signed-off-by: Len Brown <
[email protected]
>
drivers/acpi/ec.c
patch
|
blob
|
history
diff --git
a/drivers/acpi/ec.c
b/drivers/acpi/ec.c
index 71caa7d983a3caa43420c1584f056694150ecc44..b649ac7122a510014912fd1e90962f935bf30d6e 100644
(file)
--- a/
drivers/acpi/ec.c
+++ b/
drivers/acpi/ec.c
@@
-730,14
+730,14
@@
static int acpi_ec_add(struct acpi_device *device)
static int acpi_ec_remove(struct acpi_device *device, int type)
{
struct acpi_ec *ec;
- struct acpi_ec_query_handler *handler;
+ struct acpi_ec_query_handler *handler
, *tmp
;
if (!device)
return -EINVAL;
ec = acpi_driver_data(device);
mutex_lock(&ec->lock);
- list_for_each_entry
(handler
, &ec->list, node) {
+ list_for_each_entry
_safe(handler, tmp
, &ec->list, node) {
list_del(&handler->node);
kfree(handler);
}