From 498a093cde191c1848861719ed135426f0c28363 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 27 Feb 2022 19:38:48 +0000 Subject: [PATCH] Some possible leaks? git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3851 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/ssb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ssb.c b/src/ssb.c index 9f9b48d8..64d5cd42 100644 --- a/src/ssb.c +++ b/src/ssb.c @@ -270,6 +270,11 @@ static void _tf_ssb_connection_on_tcp_alloc(uv_handle_t* handle, size_t suggeste static void _tf_ssb_connection_on_write(uv_write_t* req, int status) { + if (status) + { + tf_ssb_connection_t* connection = req->data; + _tf_ssb_connection_close(connection, "write failed asynchronously"); + } free(req); } @@ -282,6 +287,7 @@ static void _tf_ssb_write(tf_ssb_connection_t* connection, void* data, size_t si if (result) { _tf_ssb_connection_close(connection, "write failed"); + free(write); } }