From: Andrei Emeltchenko <[email protected]>
---
tools/btgatt-client.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
index 41b85ad..021000d 100644
--- a/tools/btgatt-client.c
+++ b/tools/btgatt-client.c
@@ -1124,6 +1124,7 @@ int main(int argc, char *argv[])
EPOLLIN | EPOLLRDHUP | EPOLLHUP | EPOLLERR,
prompt_read_cb, cli, NULL) < 0) {
fprintf(stderr, "Failed to initialize console\n");
+ client_destroy(cli);
return EXIT_FAILURE;
}
--
1.9.1