In the Linux kernel, the following vulnerability has been resolved:
net: hns3: make sure ptp clock is unregister and freed if hclgeptpget_cycle returns an error
During the initialization of ptp, hclgeptpgetcycle might return an error and returned directly without unregister clock and free it. To avoid that, call hclgeptpdestroyclock to unregist and free clock if hclgeptpget_cycle failed.