[Nouveau] [PATCH] drm/nouveau/iccsense: fix memory leak on default sensor->type case

2016-06-03 Thread karol herbst
Hi Colin, thanks for pointing this out, but I am quite sure this continue statement won't ever be hit, ever. check the nvkm_iccsense_create_sensor function. A sensor object will only be created for one of those three types and others don't exist. I've just added that default statement to shut

[Nouveau] [PATCH] drm/nouveau/iccsense: fix memory leak on default sensor->type case

2016-06-03 Thread Colin Ian King
On 03/06/16 10:55, karol herbst wrote: > Hi Colin, > > thanks for pointing this out, but I am quite sure this continue > statement won't ever be hit, ever. > > check the nvkm_iccsense_create_sensor function. A sensor object will > only be created for one of those three types and others don't

[PATCH] drm/nouveau/iccsense: fix memory leak on default sensor->type case

2016-06-03 Thread Ben Skeggs
On 06/02/2016 08:28 PM, Colin King wrote: > From: Colin Ian King > > The default sensor->type case leaks memory allocated to rail. Fix > this by free'ing rail before we continue with the next loop iteration. This doesn't completely fix the issue, as there are continue statements in other

[PATCH] drm/nouveau/iccsense: fix memory leak on default sensor->type case

2016-06-02 Thread Colin King
From: Colin Ian King The default sensor->type case leaks memory allocated to rail. Fix this by free'ing rail before we continue with the next loop iteration. Signed-off-by: Colin Ian King --- drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 1 + 1 file changed,