tests/test-arm-mptimer: Don't leak string memory
commit0012eb98f165e98ede33b5b57fb1985f1fe224b7
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 14 Dec 2018 13:30:54 +0000 (14 13:30 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 14 Dec 2018 13:30:54 +0000 (14 13:30 +0000)
tree282ccdaeca9f6cf19ae6fd3c520fcc414ac028cb
parentc0983085d127b1efb287337de26679c051abda07
tests/test-arm-mptimer: Don't leak string memory

The test-arm-mptimer setup creates a lot of test names using
g_strdup_printf() and never frees them. This is entirely
harmless since it's one-shot test code, but it clutters
up the output from clang's LeakSanitizer. Refactor to
use a helper function so we can free the memory.

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-5-peter.maydell@linaro.org
tests/test-arm-mptimer.c