hw/rx/rx-gdbsim: Fix memory leak (CID 1432307)
commit60f6de8fbafa5dc57af63792e3ba1a910239d195
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Wed, 28 Oct 2020 15:08:10 +0000 (28 16:08 +0100)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 8 Nov 2020 23:53:07 +0000 (9 00:53 +0100)
treefb26fc9e6115586760dddacd6ab95384a242b626
parentf166061c73f070ce98a9003bdaeedd39ab034eed
hw/rx/rx-gdbsim: Fix memory leak (CID 1432307)

As load_device_tree() returns allocated memory,
we need to free it.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Fixes: bda19d7bb56 ("hw/rx: Add RX GDB simulator")
Reported-by: Coverity (CID 1432307: RESOURCE_LEAK)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201102104542.2064745-1-f4bug@amsat.org>
hw/rx/rx-gdbsim.c