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:
a870a02
)
pktgen: Fix memory leak in pktgen_if_write
author
Gustavo A. R. Silva
<
[email protected]
>
Wed, 14 Mar 2018 08:07:27 +0000
(
03:07
-0500)
committer
David S. Miller
<
[email protected]
>
Wed, 14 Mar 2018 14:02:15 +0000
(10:02 -0400)
_buf_ is an array and the one that must be freed is _tp_ instead.
Fixes: a870a02cc963 ("pktgen: use dynamic allocation for debug print buffer")
Reported-by: Wang Jian <
[email protected]
>
Signed-off-by: Gustavo A. R. Silva <
[email protected]
>
Acked-by: Arnd Bergmann <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/core/pktgen.c
patch
|
blob
|
history
diff --git
a/net/core/pktgen.c
b/net/core/pktgen.c
index fd65761e1fed2511c2460a256f4126dbbeb9acd5..545cf08cd558c559b7dec3aad1e84c44de3032d1 100644
(file)
--- a/
net/core/pktgen.c
+++ b/
net/core/pktgen.c
@@
-913,7
+913,7
@@
static ssize_t pktgen_if_write(struct file *file,
return PTR_ERR(tp);
pr_debug("%s,%zu buffer -:%s:-\n", name, count, tp);
- kfree(
buf
);
+ kfree(
tp
);
}
if (!strcmp(name, "min_pkt_size")) {