nvk/nvkmd: Stop leaking the primary FD
4db1bd5846 ("nvk/nvkmd: Implement dev and pdev for nouveau")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31470>
This commit is contained in:
committed by
Marge Bot
parent
f546df95a6
commit
64e3e2890d
@@ -140,6 +140,9 @@ nvkmd_nouveau_pdev_destroy(struct nvkmd_pdev *_pdev)
|
||||
{
|
||||
struct nvkmd_nouveau_pdev *pdev = nvkmd_nouveau_pdev(_pdev);
|
||||
|
||||
if (pdev->primary_fd >= 0)
|
||||
close(pdev->primary_fd);
|
||||
|
||||
nouveau_ws_device_destroy(pdev->ws_dev);
|
||||
FREE(pdev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user