pktgen: Fix memory leak in pktgen_if_write
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 14 Mar 2018 08:07:27 +0000 (03:07 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Mar 2018 14:02:15 +0000 (10:02 -0400)
commit29d1df72ce2ac187d457990fe445a16212dcfa19
tree099306c5dd9e6a77ddc750bcd37d1913ca9fe9a3
parenta870a02cc963de35452bbed932560ed69725c4f2
pktgen: Fix memory leak in pktgen_if_write

_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 <jianjian.wang1@gmail.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/pktgen.c