Re: [PATCH] clk: fix a missing-free bug in clk_cpy_name()

2019-06-07 Thread Gen Zhang
On Fri, Jun 07, 2019 at 11:10:37AM +0200, Jiri Slaby wrote: > On 07. 06. 19, 3:52, Gen Zhang wrote: > > @@ -3491,6 +3492,8 @@ static int clk_core_populate_parent_map(struct > > clk_core *core) > > kfree_const(parents[i].name); > >

Re: [PATCH] clk: fix a missing-free bug in clk_cpy_name()

2019-06-07 Thread Jiri Slaby
On 07. 06. 19, 3:52, Gen Zhang wrote: > @@ -3491,6 +3492,8 @@ static int clk_core_populate_parent_map(struct > clk_core *core) > kfree_const(parents[i].name); > kfree_const(parents[i].fw_name); > }

Re: [PATCH] clk: fix a missing-free bug in clk_cpy_name()

2019-06-06 Thread Gen Zhang
On Thu, Jun 06, 2019 at 01:16:45PM -0700, Stephen Boyd wrote: > Quoting Gen Zhang (2019-06-05 09:00:43) > > On Wed, Jun 05, 2019 at 08:38:00AM +0200, Jiri Slaby wrote: > > > On 31. 05. 19, 3:14, Gen Zhang wrote: > > > > In clk_cpy_name(), '*dst_p'('parent->name'and 'parent->fw_name') and > > > >

Re: [PATCH] clk: fix a missing-free bug in clk_cpy_name()

2019-06-06 Thread Stephen Boyd
Quoting Gen Zhang (2019-06-05 09:00:43) > On Wed, Jun 05, 2019 at 08:38:00AM +0200, Jiri Slaby wrote: > > On 31. 05. 19, 3:14, Gen Zhang wrote: > > > In clk_cpy_name(), '*dst_p'('parent->name'and 'parent->fw_name') and > > > 'dst' are allcoted by kstrdup_const(). According to doc: "Strings > > >

Re: [PATCH] clk: fix a missing-free bug in clk_cpy_name()

2019-06-05 Thread Gen Zhang
On Wed, Jun 05, 2019 at 08:38:00AM +0200, Jiri Slaby wrote: > On 31. 05. 19, 3:14, Gen Zhang wrote: > > In clk_cpy_name(), '*dst_p'('parent->name'and 'parent->fw_name') and > > 'dst' are allcoted by kstrdup_const(). According to doc: "Strings > > allocated by kstrdup_const should be freed by

Re: [PATCH] clk: fix a missing-free bug in clk_cpy_name()

2019-06-05 Thread Jiri Slaby
On 31. 05. 19, 3:14, Gen Zhang wrote: > In clk_cpy_name(), '*dst_p'('parent->name'and 'parent->fw_name') and > 'dst' are allcoted by kstrdup_const(). According to doc: "Strings > allocated by kstrdup_const should be freed by kfree_const". So > 'parent->name', 'parent->fw_name' and 'dst' should

[PATCH] clk: fix a missing-free bug in clk_cpy_name()

2019-05-30 Thread Gen Zhang
In clk_cpy_name(), '*dst_p'('parent->name'and 'parent->fw_name') and 'dst' are allcoted by kstrdup_const(). According to doc: "Strings allocated by kstrdup_const should be freed by kfree_const". So 'parent->name', 'parent->fw_name' and 'dst' should be freed. Signed-off-by: Gen Zhang --- diff

[PATCH] clk: fix a missing-free bug in clk_cpy_name()

2019-05-27 Thread Gen Zhang
In clk_cpy_name(), '*dst_p'('parent->name'and 'parent->fw_name') and 'dst' are allcoted by kstrdup_const(). According to doc: "Strings allocated by kstrdup_const should be freed by kfree_const". So 'parent->name', 'parent->fw_name' and 'dst' should be freed. Signed-off-by: Gen Zhang --- diff