(trunk, libT) #5583 'blockfile.tmp file descriptor is leaked when importing blocklist' -- fix by rb07.

This commit is contained in:
Jordan Lee 2014-01-19 02:03:41 +00:00
parent f6fadd586f
commit f470ab3210
1 changed files with 2 additions and 0 deletions

View File

@ -1542,6 +1542,8 @@ gotNewBlocklist (tr_session * session,
if (write (fd, response, response_byte_count) < 0) 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_snprintf (result, sizeof (result), _("Couldn't save file \"%1$s\": %2$s"), filename, tr_strerror (errno));
tr_close_file(fd);
if (*result) if (*result)
{ {
tr_logAddError ("%s", result); tr_logAddError ("%s", result);