Markus Elfring
2020-May-31 08:03 UTC
[Nouveau] [PATCH] drm/nouveau/clk/gm20b: Fix memory leak in gm20b_clk_new()
> When gk20a_clk_ctor() returns an error code, pointer "clk" > should be released.Such an information is reasonable.> It's the same when gm20b_clk_new() returns from elsewhere following this call.I suggest to reconsider the interpretation of the software situation once more. Can it be that the allocated clock object should be kept usable even after a successful return from this function? Would you like to add the tag ?Fixes? to the commit message? Regards, Markus
dinghao.liu at zju.edu.cn
2020-May-31 08:23 UTC
[Nouveau] [PATCH] drm/nouveau/clk/gm20b: Fix memory leak in gm20b_clk_new()
> > > It's the same when gm20b_clk_new() returns from elsewhere following this call. > > I suggest to reconsider the interpretation of the software situation once more. > Can it be that the allocated clock object should be kept usable even after > a successful return from this function? >It's possible that we expect an usable clk pointer, though I could not find the exact usage yet. For security, I will release this pointer only on error paths in this function.> > Would you like to add the tag ?Fixes? to the commit message? >Thank you for your advice! I will add this tag in the next version of patch. Regards, Dinghao
Markus Elfring
2020-May-31 08:38 UTC
[Nouveau] drm/nouveau/clk/gm20b: Fix memory leak in gm20b_clk_new()
> It's possible that we expect an usable clk pointer, though I could not find > the exact usage yet.I am curious if another developer would like to add helpful background information.> For security, I will release this pointer only on error paths in this function.Do you tend to release objects (which are referenced by pointers)? Regards, Markus
Maybe Matching Threads
- [PATCH] drm/nouveau/clk/gm20b: Fix memory leak in gm20b_clk_new()
- [PATCH] drm/nouveau/clk/gm20b: Fix memory leak in gm20b_clk_new()
- [PATCH] drm/nouveau/clk/gm20b: Fix memory leak in gm20b_clk_new
- [PATCH] drm/nouveau/clk/gm20b: Fix memory leak in gm20b_clk_new()
- [PATCH] drm/nouveau/clk/gm20b: Fix memory leak in gm20b_clk_new()