diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-01-27 13:40:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-28 16:36:28 +0300 |
commit | 3bd747c7ea13cb145f0d84444e00df928b0842d9 (patch) | |
tree | e55b7ae8dd3191d807213c356d02025a0b636646 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | c151d5ed8e8fe0474bd61dce7f2076ca5916c683 (diff) | |
download | linux-3bd747c7ea13cb145f0d84444e00df928b0842d9.tar.xz |
nvmem: core: initialise nvmem->id early
The error path for wp_gpio attempts to free the IDA nvmem->id, but
this has yet to be assigned, so will always be zero - leaking the
ID allocated by ida_alloc(). Fix this by moving the initialisation
of nvmem->id earlier.
Fixes: f7d8d7dcd978 ("nvmem: fix memory leak in error path")
Cc: stable@vger.kernel.org
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230127104015.23839-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions