]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: double free in devlink_resource_fill()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 21 Sep 2018 08:07:55 +0000 (11:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 22 Sep 2018 02:19:07 +0000 (19:19 -0700)
commitb7bb4dacb5506371ae3459d30241bd6bc15ff2e8
tree11945dfd4538b07a1cd32e8093b20b8bbbb1b988
parent12631ab5ffbf80ef0db613e7bccb0b6e6ffa7306
devlink: double free in devlink_resource_fill()

Smatch reports that devlink_dpipe_send_and_alloc_skb() frees the skb
on error so this is a double free.  We fixed a bunch of these bugs in
commit 5da04de41ec3 ("devlink: Remove redundant free on error path") but
we accidentally overlooked this one.

Fixes: 6de8841aed26 ("devlink: Add support for resource abstraction")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c