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:
7fa38e7
)
uml: drivers/net_user.c memory leak fix
author
Vitaliy Ivanov
<
[email protected]
>
Tue, 26 Jul 2011 00:12:49 +0000
(17:12 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 26 Jul 2011 03:57:12 +0000
(20:57 -0700)
Perform memory cleanup on exit. On receiving invalid 'pid' we still
should clean 'output' variable.
Signed-off-by: Vitaliy Ivanov <
[email protected]
>
Signed-off-by: Richard Weinberger <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
arch/um/drivers/net_user.c
patch
|
blob
|
history
diff --git
a/arch/um/drivers/net_user.c
b/arch/um/drivers/net_user.c
index 9415dd9e63ef1e98c15505733c3ba1c1eff02029..520118888f163755fce86c802f55b1ac2c83c8a5 100644
(file)
--- a/
arch/um/drivers/net_user.c
+++ b/
arch/um/drivers/net_user.c
@@
-228,7
+228,10
@@
static void change(char *dev, char *what, unsigned char *addr,
"buffer\n");
pid = change_tramp(argv, output, output_len);
- if (pid < 0) return;
+ if (pid < 0) {
+ kfree(output);
+ return;
+ }
if (output != NULL) {
printk("%s", output);