]> git.baikalelectronics.ru Git - kernel.git/commit
cosa: Add missing kfree in error path of cosa_write
authorWang Hai <wanghai38@huawei.com>
Tue, 10 Nov 2020 14:46:14 +0000 (22:46 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Nov 2020 01:52:01 +0000 (17:52 -0800)
commit74611edd26fd9c07a0e2172248dec0dd35d936a5
treed13679d9a8b7fe3e1a5fcb20b7435ebb18727484
parent9d9c46017a13373d394fca96593888f6f9443119
cosa: Add missing kfree in error path of cosa_write

If memory allocation for 'kbuf' succeed, cosa_write() doesn't have a
corresponding kfree() in exception handling. Thus add kfree() for this
function implementation.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Acked-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Link: https://lore.kernel.org/r/20201110144614.43194-1-wanghai38@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wan/cosa.c