Unverified Commit 13bf2d18 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

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

parents bcc30ddf b833dd51
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -101,8 +101,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);