]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: Fix possible memory leak caused by invalid cast
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Sat, 7 Aug 2021 01:15:46 +0000 (18:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 8 Aug 2021 11:56:41 +0000 (12:56 +0100)
commit3b573b66488133c6b4629b93d48f9198fbce575a
treed8df2ca2a3ae7cd50400c9ac5020b1e576906534
parent27443e97633ee02f0fa53fa09d0c2a25a5712470
ptp: Fix possible memory leak caused by invalid cast

Fixes possible leak of PTP virtual clocks.

The number of PTP virtual clocks to be unregistered is passed as
'u32', but the function that unregister the devices handles that as
'u8'.

Fixes: 63349b2f3b14 ("ptp: support ptp physical/virtual clocks conversion")
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ptp/ptp_sysfs.c