diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-12-14 13:30:53 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-12-14 13:30:53 +0000 |
commit | ac87e5072e2cbfcf8e80caac7ef43ceb6914c7af (patch) | |
tree | 91998edd831b0e28a110f61e6ce2dbd4ff47212f /hw/arm | |
parent | 061923298fe34e1bf5f32006f8d725a547fc4118 (diff) | |
download | qemu-ac87e5072e2cbfcf8e80caac7ef43ceb6914c7af.zip qemu-ac87e5072e2cbfcf8e80caac7ef43ceb6914c7af.tar.gz qemu-ac87e5072e2cbfcf8e80caac7ef43ceb6914c7af.tar.bz2 |
target/arm: Free name string in ARMCPRegInfo hashtable entries
When we add a new entry to the ARMCPRegInfo hash table in
add_cpreg_to_hashtable(), we allocate memory for tehe
ARMCPRegInfo struct itself, and we also g_strdup() the
name string. So the hashtable's value destructor function
must free the name string as well as the struct.
Spotted by clang's leak sanitizer. The leak here is a
small one-off leak at startup, because we don't support
CPU hotplug, and so the only time when we destroy
hash table entries is for the case where ARM_CP_OVERRIDE
means we register a wildcard entry and then override it later.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181204132952.2601-2-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm')
0 files changed, 0 insertions, 0 deletions