Re: [PATCH] drm/nouveau/core/object: fix double free on error in nvkm_ioctl_new()

2021-06-17 Thread Dan Carpenter
On Mon, Jun 14, 2021 at 01:43:27PM +0300, Dan Carpenter wrote: > If nvkm_object_init() fails then we should not call nvkm_object_fini() > because it results in calling object->func->fini(object, suspend) twice. > Once inside the nvkm_object_init() function and once inside the > nvkm_object_fini()

Re: [PATCH] drm/nouveau/core/object: fix double free on error in nvkm_ioctl_new()

2021-06-14 Thread Dan Carpenter
On Mon, Jun 14, 2021 at 01:43:27PM +0300, Dan Carpenter wrote: > If nvkm_object_init() fails then we should not call nvkm_object_fini() > because it results in calling object->func->fini(object, suspend) twice. > Once inside the nvkm_object_init() function and once inside the > nvkm_object_fini()

[PATCH] drm/nouveau/core/object: fix double free on error in nvkm_ioctl_new()

2021-06-14 Thread Dan Carpenter
If nvkm_object_init() fails then we should not call nvkm_object_fini() because it results in calling object->func->fini(object, suspend) twice. Once inside the nvkm_object_init() function and once inside the nvkm_object_fini() function. Fixes: fbd58ebda9c8 ("drm/nouveau/object: merge with