Thread (6 messages) 6 messages, 3 authors, 2021-06-28

Re: [PATCH 1/1] clk: tegra: tegra124-emc: Fix possible memory leak

From: Stephen Boyd <sboyd@kernel.org>
Date: 2021-06-25 23:31:24
Also in: linux-clk, lkml

Quoting Zhen Lei (2021-06-17 01:27:59)
When krealloc() fails to expand the memory and returns NULL, the original
memory is not released. In this case, the original "timings" scale should
be maintained.

Fixes: 888ca40e2843 ("clk: tegra: emc: Support multiple RAM codes")
Signed-off-by: Zhen Lei <redacted>
---
Looks correct, but when does krealloc() return NULL? My read of the
kerneldoc is that it would return the original memory if the new
allocation "failed".

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help