aros-development-team / AROS

Main AROS repository for active development. Contains the main Operating System components and Build System.
http://www.aros.org
Other
368 stars 60 forks source link

Memory Leak created on return without closing nvdev #600

Open stanman29 opened 1 year ago

stanman29 commented 1 year ago

https://github.com/aros-development-team/AROS/blob/02d78b26bb8ea343fa3617e668e0057b1c706c06/workbench/hidds/nouveau/drm/libdrm/nouveau/nouveau_device.c#L50

In the if-statement this return error no. is returned without closing "nvdev". Yet in the next if-statement "nvdev" is closed! This must cause a memory leak if the first path is followed? Because even if "ver" value is not null it still needs to close "nvdev" to return to the orginal state before this function started!