[PATCH] tools: Destroy client on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux