Unverified Commit 1ed85cbd authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5755 sh: push-switch: Reorder cleanup operations to avoid use-after-free bug

parents b15aafa9 96a00fdf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -104,8 +104,8 @@ static int switch_drv_remove(struct platform_device *pdev)
		device_remove_file(&pdev->dev, &dev_attr_switch);

	platform_set_drvdata(pdev, NULL);
	flush_work(&psw->work);
	del_timer_sync(&psw->debounce);
	flush_work(&psw->work);
	free_irq(irq, pdev);

	kfree(psw);