From f470ab321007831fc5718231ab563831127bb8bc Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sun, 19 Jan 2014 02:03:41 +0000 Subject: [PATCH] (trunk, libT) #5583 'blockfile.tmp file descriptor is leaked when importing blocklist' -- fix by rb07. --- libtransmission/rpcimpl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libtransmission/rpcimpl.c b/libtransmission/rpcimpl.c index f55d136e6..e71fb45df 100644 --- a/libtransmission/rpcimpl.c +++ b/libtransmission/rpcimpl.c @@ -1542,6 +1542,8 @@ gotNewBlocklist (tr_session * session, if (write (fd, response, response_byte_count) < 0) tr_snprintf (result, sizeof (result), _("Couldn't save file \"%1$s\": %2$s"), filename, tr_strerror (errno)); + tr_close_file(fd); + if (*result) { tr_logAddError ("%s", result); -- 2.40.0