monitor: Fix crash when using RTT backend
authorSzymon Janc <szymon.janc@codecoup.pl>
Fri, 24 Jun 2022 08:25:41 +0000 (10:25 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit461bce3c2c79c0c2533c51aef3254475e9e7e0b6
tree19b0498aad92b6d4a3cf0aa7cc81e164a1178b5b
parentdf1475ebd4b395fc37ebb664d488680b88e4be90
monitor: Fix crash when using RTT backend

This fix regression introduced by "monitor: Fix memory leaks".
J-Link shared library is in use if jlink_init() returns 0 and thus
handle shall not be closed.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
monitor/jlink.c