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:
a6eb0be
)
[PATCH] um: fix a memory leak in the multicast driver
author
Paolo 'Blaisorblade' Giarrusso
<
[email protected]
>
Thu, 8 Mar 2007 04:41:09 +0000
(20:41 -0800)
committer
Linus Torvalds
<
[email protected]
>
Thu, 8 Mar 2007 15:38:21 +0000
(07:38 -0800)
Memory allocated by mcast_user_init must be freed in the matching mcast_remove.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <
[email protected]
>
Acked-by: Jeff Dike <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
arch/um/drivers/mcast_user.c
patch
|
blob
|
history
diff --git
a/arch/um/drivers/mcast_user.c
b/arch/um/drivers/mcast_user.c
index 8138f5ea1bf7516272de7b086ead9ca8295306ea..b827e82884c98ad7ecf266387dd722fe6b6edede 100644
(file)
--- a/
arch/um/drivers/mcast_user.c
+++ b/
arch/um/drivers/mcast_user.c
@@
-50,6
+50,14
@@
static void mcast_user_init(void *data, void *dev)
pri->dev = dev;
}
+static void mcast_remove(void *data)
+{
+ struct mcast_data *pri = data;
+
+ kfree(pri->mcast_addr);
+ pri->mcast_addr = NULL;
+}
+
static int mcast_open(void *data)
{
struct mcast_data *pri = data;
@@
-157,7
+165,7
@@
const struct net_user_info mcast_user_info = {
.init = mcast_user_init,
.open = mcast_open,
.close = mcast_close,
- .remove =
NULL
,
+ .remove =
mcast_remove
,
.set_mtu = mcast_set_mtu,
.add_address = NULL,
.delete_address = NULL,